dfhack
dfhack copied to clipboard
the "unit stranded" detector should try pulsing the "recompute walkability" toggle
There have been reports of DF's walkability map getting corrupted, leading to odd pathing fails. This sometimes show up with DFHack's notifier as a unit being stranded for no apparent reason.
Given that we're detecting the symptoms of this bug already, we could mitigate it by automatically strobing the "recompute walkability" global toggle whenever a unit is detected as stranded; this will force DF to recompute the walkability matrix and possibly unstrand the stranded dwarf.
There should be a cooldown on this because recomputing walkability is expensive and doing it frequently will cause significant lag.