Skip to content

item: items in unwalkable buildings are reachable from adjacent tiles - #1625

Open
Alistair-Afton wants to merge 1 commit into
DFHack:masterfrom
Alistair-Afton:fix-item-building-reachability
Open

Alistair-Afton wants to merge 1 commit into
DFHack:masterfrom
Alistair-Afton:fix-item-building-reachability

Conversation

@Alistair-Afton

Copy link
Copy Markdown

Summary

Fixes DFHack/dfhack#5771

The reachable/unreachable filters only checked the walkable group of the item's own tile. Loose contents of impassable buildings (like bolts loaded in a bolt thrower) were therefore always reported unreachable even though citizens can retrieve them by standing next to the building.

When the item tile is not citizen-walkable, the check now also looks at whether the item is held by or sitting on a building that has a citizen-reachable tile in or next to its footprint. Items installed as building components (use_mode PERM: mechanisms, well buckets, built furniture) are still unreachable, as are items in wall constructions.

Testing

In a live fort:

  • Moved a loose item into a well (impassable building) as TEMP content: previously unreachable, now reachable via the adjacent walkable tile.
  • All unwalkable-tile held items in the fort are PERM components (statues, floodgate/well parts, trap mechanisms) and remain unreachable.
  • Walkable-tile items unchanged (fast path unchanged).

The reachable/unreachable filters only checked the item's own tile, so
loose contents of impassable buildings (like bolts loaded in a bolt
thrower) were always reported unreachable even though citizens can
retrieve them by standing next to the building.

When the item tile is not citizen-walkable, now also check whether the
item is in or on a building with a citizen-reachable tile in or next to
its footprint. Items installed as building components (use_mode PERM,
e.g. mechanisms, well buckets, built furniture) are still unreachable,
as are items in wall constructions.

Fixes DFHack/dfhack#5771
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Items in bolt throwers considered unreachable

1 participant