There’s not much to say here other than the fact that I’ve given players the ability to control the time of day by bringing up the menu, selecting the Time of Day button, and then selecting where they’d like the sun to be.
I hate them. I really, really do.
Seriously, I spent something like three hours today fixing something that I thought I had fixed yesterday but which turned out to have been broken all along in a way that made me think it was working. In any case, I have made it so that AI will now check to see if a worksite is fully occupied before determining whether they should go to it.
If a building is not fully occupied the building will be evaluated based on its distance to the AI and if it’s the closest one the AI will select it as the target and increase its current worker could. Meanwhile, a building that is fully occupied will be skipped over in favour of another workplace altogether. I don’t yet have a behaviour for what the worshippers should do if all workplaces are occupied (right now they’ll go to the first workplace on the array generated when they ask for the closet workplace), but I’ll handle that sometime tomorrow or Friday.
I’ll also need to add a similar behaviour for when the AI are looking for houses, and I’ll need to set up the AI to lower the current occupancy count of their workplace when they stop work. They don’t do that yet as I was tired of writing AI code and decided that 50% was a good place to stop (although realistically it’s about 25% done at best).