rythwh / snowship

Snowship is a colony survival management simulation game under development since early 2015.
https://rywh.itch.io/snowship
5 stars 0 forks source link

Convert the Colonist's storedJob variable to be a list. #103

Open rythwh opened 3 years ago

rythwh commented 3 years ago

This would require reworking the job allocation system to be compatible with storing multiple jobs rather than the current method of storing some job properties outside of jobs entirely (e.g. containerPickups).

This would allow colonists to take multiple jobs in the same area and do them simultaneously (e.g. if performing a Build job and the colonist needs to take resources from some containers to perform the job, this would allow them to reserve multiple Build jobs in close proximity, take their required resources in only one pickup, and then perform all of those jobs one after the other, without having to go back and pick up resources for the next one, saving lots of time).

Additionally would be used for when the player wants to change a colonist's clothes, as it would allow them to select each item of clothing one after the other and have the colonist store each of those pickup jobs separately, but eventually get to them all without one job being cancelled/overwritten (current result) or the player having to wait until the colonist has collected the one item of clothing before telling them to do the next one (current workaround and very annoying). See #92.

rythwh commented 3 years ago

This is actually way more difficult than I expected as it involves rewriting the entire job system. (I should've just used a list from the start...) As a stop-gap measure I'm going to implement an additional backlog list of jobs onto colonists so the current job-storedJob relationship still works as it always did, but colonists will be able to store jobs in their backlog. This allows for essentially the same functionality as this ticket originally intended, but not as "clean" because it introduces a new variable rather than refactoring an existing one.