![]() ![]() A colonist would do this if a room lost oxygen or if they were being shot by pirates (among other things.) Needs States can also be started immediately, interrupting the current state. Otherwise a colonist would wait all day to eat something, and possibly die. A starving colonist would queue the "Eat Food" state as Need Urgent in the Any category. States queued here can be performed at any time, regardless of schedule. There is an exception to this system, of course, and that's the "Any" category. When morale is low, colonists replace the work category with free time. You wouldn't want your colonist to stop working in the middle of the day just to use the bathroom or get some food. Throughout the day they're allowed to do different things. To solve this issue, we use "categories".Ĭolonists have a schedule (that you can change however you want). One inherent flaw of this system is that a colonist will always selfishly worry about his own needs even when he should be working. We could easily queue "Eat Food" with a priority of Want_Normal if a colonist isn't very hungry. There's nothing forcing us to queue a state like "Eat Food" with a priority of Need. The rationale is fairly easy to see-needs are handled first, then jobs, then wants. To ensure that colonists promptly keep themselves alive we have a priority system (from least important to most important). For example, eating food is much more important than using the bathroom. PriorityĬolonists care about some states more than others. The order of states is determined by 2 things: Priority and Category. ![]() Whenever a state finishes, the colonist starts the next one in the queue. The code is something like: colonist.QueueState(state, Priority.Needs, Category.Work) ![]() Internally, colonists add all states to a queue. If a colonist stopped everything just to use the bathroom or get food, nothing would ever get done. Almost every state involves the colonists going somewhere in the station.Īlmost every state shares the same pattern:Ī collection of states composes a "queue".Ĭolonists always have a bunch of things that they want to do. "Go to bathroom" is actually its own state that is used when colonists have to go someplace. Go to Bathroom (if colonist failed on the route, wait and then find a new bathroom).Find Bathroom (if none were found, fail, and requeue later). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |