item: items in unwalkable buildings are reachable from adjacent tiles - #1625
Open
Alistair-Afton wants to merge 1 commit into
Open
Alistair-Afton wants to merge 1 commit into
Alistair-Afton wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes DFHack/dfhack#5771
The
reachable/unreachablefilters 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_modePERM: mechanisms, well buckets, built furniture) are still unreachable, as are items in wall constructions.Testing
In a live fort:
unreachable, nowreachablevia the adjacent walkable tile.unreachable.