You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Importing old work details breaks Mechanics Workshop (and Jewelers) #5503
Load the work details using DFHack (Miners, Wooders, Animal stuff should be the names of the first 3 work details)
Assign a dwarf to a work detail. Check some boxes. (I only tested it when clicking miners)
Try to build a Mechanics Workshop and a Jewelers Workshop.
You will see "N/A" will be assigned to the construction task. Forever.
(Setting it to high priority or setting a specific material won't do anything)
Even creating a "everybody does this" work detail with every work detail check-marked wont make it possible to construct the workshop.
Sidenote: I did a session with this bug and the jeweler workshop started working for no apparent reason in my fort after quite a while. Probably while reassigning work details once i had more dwarves, not sure.
If you load the work detail list but don't check mark anything (i.e. apply the changes) there isnt any issue.
Root cause: importing work details updated each detail's allowed labors but never recomputed the units' effective labor flags, so workshops depending on the imported details found no workers until something else triggered recomputation. The fix calls dfhack.units.setAutomaticProfessions() for all citizens after import — the same call the game makes when applying work details through the labor UI — which also removes the documented caveat about needing to make a manual change first.
While in there, saved built-in details now also match by icon when names differ (e.g. details renamed by the user or a DF update), the settings file is re-read on each load so mid-session file swaps are seen, and malformed entries are skipped instead of erroring.
I noticed a bug that makes it impossible to construct a mechanics workshop. Other workshops are unaffected as far as I noticed.
Heres how to recreate the bug:
Even creating a "everybody does this" work detail with every work detail check-marked wont make it possible to construct the workshop.

Sidenote: I did a session with this bug and the jeweler workshop started working for no apparent reason in my fort after quite a while. Probably while reassigning work details once i had more dwarves, not sure.
If you load the work detail list but don't check mark anything (i.e. apply the changes) there isnt any issue.