feat: Add grid-based player movement manager, new 'stop_n_go' arena, and core game scene setup.

This commit is contained in:
Yogi Wiguna
2026-03-13 14:37:13 +08:00
parent 898f867cee
commit 6e43cb5337
10 changed files with 117 additions and 4 deletions
@@ -90,6 +90,20 @@ func simple_move_to(grid_position: Vector2i) -> bool:
# Allow passing through Walls (Item 4 or 16) if Invisible
var is_wall_passable = player.get("is_invisible") and (cell_floor == 4 or cell_item == 16 or cell_item == 4)
# NEW: Impenetrable wall check (User request) - Certain coordinates are "Hard" walls even for Ghost
# These generally correspond to the arena borders and environmental static obstacles.
if is_wall_passable:
var impenetrable_coords = [
Vector2i(0,0), Vector2i(1,0), Vector2i(2,0), Vector2i(3,0), Vector2i(4,0), Vector2i(5,0), Vector2i(6,0), Vector2i(7,0), Vector2i(8,0), Vector2i(9,0), Vector2i(10,0), Vector2i(13,0), Vector2i(19,0), Vector2i(20,0), Vector2i(21,0), Vector2i(22,0),
Vector2i(0,1), Vector2i(1,1), Vector2i(2,1), Vector2i(3,1), Vector2i(6,1),
Vector2i(0,2), Vector2i(1,2), Vector2i(2,2), Vector2i(3,2),
Vector2i(17,9), Vector2i(18,9), Vector2i(19,9), Vector2i(20,9), Vector2i(21,9), Vector2i(22,9),
Vector2i(11,10), Vector2i(12,10), Vector2i(13,10), Vector2i(15,10), Vector2i(16,10), Vector2i(17,10), Vector2i(18,10), Vector2i(19,10), Vector2i(20,10), Vector2i(21,10), Vector2i(22,10),
Vector2i(0,11), Vector2i(4,11), Vector2i(5,11), Vector2i(6,11), Vector2i(10,11), Vector2i(12,11), Vector2i(13,11), Vector2i(14,11), Vector2i(15,11), Vector2i(16,11), Vector2i(17,11), Vector2i(18,11), Vector2i(19,11), Vector2i(20,11), Vector2i(21,11), Vector2i(22,11)
]
if grid_position in impenetrable_coords:
is_wall_passable = false
# Check Floor 0 (Basic Walkability/Void)
if (cell_floor == -1 or cell_floor in enhanced_gridmap.non_walkable_items) and not is_wall_passable:
print("[Move] Failed: Floor Item %d is non-walkable" % cell_floor)