Hey Folks! Still in the process of getting crew management to work. Shifts, in particular.
My first task was to get the basic training I mentioned yesterday added. This was fairly simple to do, as I just had to add a few lines of code when crew spawns to give them basic knowledge. Later, I will probably make this data-driven. But I was anxious to keep momentum, so I started testing. And that's where I discovered some problems in the sleep system.
It turns out that my crew was spawning tired, but too uncomfortable to sleep. So they could never catch any Zs. It took me a little while to reacquaint myself with it, but it actually looked like it could work once it got up and running. It was just the starting conditions which failed to get it running.
So I made some changes to start AI with the ability to sleep whenever they want to, and their circadian rhythm unset. Then, if they try to sleep, they'll succeed. And any time they succeed in going to sleep, their circadian rhythm changes to match. (I.e. they'll sleep easier at the same time tomorrow, but have trouble sleeping outside of their rhythm)
I also added a sleeping animation, to make it a bit clearer when they're actually sleeping vs. waiting for sleep to start. This required a few tweaks to code and data to ensure the animation triggers at the right time, the crew teleports into and out of the bed appropriately, and their idle animation is appropriate for when sleeping vs. not. As you can see in today's picture, it's fairly crude. But at least it's clear!
Now that the crew can actually sleep when they're tired, I'll return to the shift settings system, to see how that feels with all the individual components working now.