Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strengthen checks to prevent missing workers #1128

Open
wants to merge 1 commit into
base: 1.3.12
Choose a base branch
from

Conversation

yarukishi
Copy link
Contributor

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.

@yarukishi
Copy link
Contributor Author

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.

repro.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant