feat: Add core game managers, main scene, enhanced gridmap, and essential assets, including a new special tiles manager for power-up effects and inventory.

This commit is contained in:
Yogi Wiguna
2026-03-11 15:29:07 +08:00
parent 4b7a64a119
commit 18c3dbecd6
9 changed files with 97 additions and 15 deletions
+12 -5
View File
@@ -84,13 +84,20 @@ func simple_move_to(grid_position: Vector2i) -> bool:
print("[Move] Failed: Cannot move to finish yet")
return false
var cell_item = enhanced_gridmap.get_cell_item(Vector3i(grid_position.x, 0, grid_position.y))
var cell_floor = enhanced_gridmap.get_cell_item(Vector3i(grid_position.x, 0, grid_position.y))
var cell_item = enhanced_gridmap.get_cell_item(Vector3i(grid_position.x, 1, grid_position.y))
# Allow passing through Walls (Item 4) if Invisible
var is_wall_passable = player.get("is_invisible") and cell_item == 4
# 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)
if (cell_item == -1 or cell_item in enhanced_gridmap.non_walkable_items) and not is_wall_passable:
print("[Move] Failed: Cell Item %d is non-walkable" % cell_item)
# 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)
return false
# Check Floor 1 (Obstacles/Walls)
if (cell_item != -1 and cell_item in [4, 13, 16]) and not is_wall_passable:
print("[Move] Failed: Blocked by Item %d on Floor 1" % cell_item)
return false
# PHYSICS CHECK: Ensure no static obstacles (like Stands) are blocking the path