Handle door navigation and turnarounds

This commit is contained in:
Tanner
2026-11-07 21:25:18 +00:00
parent be5fe260e3
commit c65705fef8
6 changed files with 497 additions and 10 deletions
+7 -1
View File
@@ -125,7 +125,13 @@ class Pathfinder(AStar):
@functools.lru_cache(maxsize=BLOCK_CACHE_SIZE)
def bair(self, p):
return self.chunks.get_block_at(*p) in blocks.NON_SOLID_IDS
state_id = self.chunks.get_block_at(*p)
if state_id in blocks.DOOR_IDS:
if blocks.PROPS.get(state_id, {}).get('open') == 'true':
return True
if state_id in blocks.OPENABLE_DOOR_IDS:
return tuple(p) not in self.g.get('unopenable_doors', set())
return state_id in blocks.NON_SOLID_IDS
@functools.lru_cache(maxsize=BLOCK_CACHE_SIZE)
def bavoid(self, p):