dfhack
dfhack copied to clipboard
Suspendmanager has some logic backwards when building a row of walls only accessible from one side
When trying to build some walls on top of other walls, using a ramp for accessibility, Suspend manager will suspend them in the incorrect order, at least in this orientation (West to East). Other orientations may be affected, but I have not tested this yet. I will add on if any other peculiarities present themself!
possibly the same issue: access ramps are on the left and right sides. I build a single wall at the top and bottom so the wall could be built from both sides at once. Only the top two edges are unsuspended. I expected the bottom two to be unsuspended as well:
@plule
Update: building a wall plus a ramp for access got better behavior:
perhaps we're not analyzing the access properties of ramps correctly
I'll to double-check, but as far as I know, the top of the ramp cannot be used to build a neighbouring wall, so these were not constructible as-is. It should have been left completely suspended by suspendmanager though, it's weird that it's not symmetrical.
update:
Yep, I just checked and these situation were not constructible, AND there's something fishy going on, even without ramps at all it will leave one side unsuspended, so the same thing with ramps and it will let dwarves lock the construction access:
The attached PR will make suspendmanager suspend the whole construction in both your cases.
We could consider the ramp tops as proper access, just to allow dwarves to build everything but the last tile in your cases, but I'm hesitant to do it, as it would break scenarios like this:
In this case, the only way to build this is from right to left, and considering the top ramp as a suitable access would allow dwarves to build it in the wrong order...
The attached PR will make suspendmanager suspend the whole construction in both your cases.
I think this is the right way to fix this. I like that it makes the handling of double-sided (i.e.. completely blocked) dead-ends symmetric. Also, I agree with @plule that we shouldn't treat ramps as proper access.
PSA: don't use ramps to get access to elevated sections of walls, use stairs!
or if you do use ramps, add a one-tile stub of wall on the level below to add floor-equivalent access