dfhack icon indicating copy to clipboard operation
dfhack copied to clipboard

buildingplan can choose to attach inaccessible items to jobs

Open myk002 opened this issue 1 year ago • 1 comments

from the code:

// This is tricky. we want to choose an item that can be brought to the job site, but that's not
// necessarily the same as job->pos. it could be many tiles off in any direction (e.g. for bridges), or
// up or down (e.g. for stairs). For now, just return if the item is on a walkable tile.
static bool isAccessible(color_ostream& out, df::item* item) {

but this isn't good enough in many cases. We should check directly orthogonal tiles (and maybe further away for floors/bridges built over empty space)

example from https://dffd.bay12games.com/file.php?id=17139

image

the building on the left chooses the inaccessible item on the right. they are both on walkable tiles, but in separate walkability groups.

myk002 avatar Jul 10 '24 16:07 myk002

a possibly related issue: buildingplan does not respect civilian alerts when active, and will assign materials which cannot be reached due to an active civilian alert, which stalls building

ab9rf avatar Aug 27 '24 15:08 ab9rf