Evolve
Evolve copied to clipboard
Strengthen checks to prevent missing workers
There have been reports that certain situations can cause workers to be stuck in limbo:
- Gaining the "Flier" trait via Mimic or Imitate when there are Cement Workers
- Quarry workers or other default jobs when impact occurs in Orbital Decay
- Possibly others...
This patch ensures that the the fastLoop does not set new workers on a job with "assigned" workers if the job is invisible and can no longer be fulfilled. It also adds some additional cases where the worker count for any invisible job is reset to 0, as a secondary protection. Finally, a few more cases where worker quantity is reset now also reset worker assignment to 0.
The following user save file demonstrates the issue in two different ways. First, about 300 workers are already "in the void", performing invisible work, when the save file is loaded. Second, changing the Mimic from Small to Avian can cause the 4 cement workers to be returned to the default job (lumberjack), then immediately reassigned, at a rate of 1 per fastLoop tick, to the invisible cement worker job.
This patch resolved both issues. On the mainline, the number of lumberjacks remains 18.