feat: add 30x20 demo map and chest interaction

This commit is contained in:
goose
2026-10-01 22:28:23 -04:00
parent b5eaf0ef4f
commit 67efd9dc67
27 changed files with 307 additions and 90 deletions
+4 -1
View File
@@ -22,7 +22,10 @@ func get_context_target() -> StringName:
return &"exit_reached"
if map.get_cell(player.cell) == GridMapState.CellKind.STAIRS:
return &"stairs"
for direction in [Vector2i.UP, Vector2i.RIGHT, Vector2i.DOWN, Vector2i.LEFT, Vector2i(1, -1), Vector2i(1, 1), Vector2i(-1, 1), Vector2i(-1, -1)]:
for direction in InteractionResolverType.TARGET_OFFSETS:
if map.get_cell(player.cell + direction) == GridMapState.CellKind.CHEST:
return &"chest"
for direction in InteractionResolverType.TARGET_OFFSETS:
if map.get_cell(player.cell + direction) == GridMapState.CellKind.CLOSED_DOOR:
return &"closed_door"
return &""