dfhack icon indicating copy to clipboard operation
dfhack copied to clipboard

reenable autolabor

Open ab9rf opened this issue 3 years ago • 1 comments

minimum required to make work:

  • realign the job table
  • add code to flip/flop the work detail enable flag

ab9rf avatar Jan 30 '23 04:01 ab9rf

This test version has multiple caveats:

  • there is no particular guarantee that the labor assignments autolabor is making are good
  • there is no way to easily see what labors are being assigned to whom, because there is no in-game mechanic for seeing the labor assignment table as Toady hid all of this away from the player. Until manipulator is ported to v50, probably the best way to see what autolabor is doing is to use Dwarf Therapist.
  • autolabor disables the work detail system when it is enabled using the mechanic provided by Toady, but there is no visual indication that this has happened. The work detail screen will pop up if the player opens it and the player can manipulate the settings there to their heart's content all without having any actual effect on the game.
  • disabling autolabor reenables the work detail system by unsetting the flag provided by Toady, but work details are only applied when the player actually opens the work detail screen and does some de minimus thing. So whatever labor settings were in place when autolabor is disabled will remain in place until the player actually opens the work detail screen (and possibly touches something on that screen to force it to recompute). This is a deficiency in the core game design that we cannot readily work around, at least not without doing code detours or calling a nonvirtualized function that would have to be located by reverse engineering

ab9rf avatar Jan 30 '23 17:01 ab9rf

and even then, perhaps we should keep it as "untested" until some reports come in saying how well it works

myk002 avatar Feb 01 '23 21:02 myk002

Because I like you, I implemented (2). WDYT?

myk002 avatar Feb 01 '23 22:02 myk002