feat: Introduce EnhancedGridMap addon for advanced grid management and procedural generation, and StaticTektonManager for tekton spawning and placement.

This commit is contained in:
Yogi Wiguna
2026-02-13 10:40:13 +08:00
parent 450ad2ce1f
commit 0ee5051ebd
7 changed files with 215 additions and 18 deletions
+16 -1
View File
@@ -382,6 +382,21 @@ func _execute_block_floor(target_pos: Vector2i):
var pos = n.position
var block_pos = Vector3i(pos.x, 0, pos.y)
# Check current item first
var current_item = enhanced_gridmap.get_cell_item(block_pos)
# Skip if already a wall or immutable
# We assume Item 4 is the wall/stand.
# Also check enhanced_gridmap.immutable_items if available
var is_immutable = false
if "immutable_items" in enhanced_gridmap:
if current_item in enhanced_gridmap.immutable_items:
is_immutable = true
if current_item == 4 or is_immutable:
# Don't overwrite existing walls/stands, and don't schedule them for "restoration" (deletion)
continue
if player.is_multiplayer_authority():
var main = player.get_tree().get_root().get_node_or_null("Main")
if main:
@@ -390,7 +405,7 @@ func _execute_block_floor(target_pos: Vector2i):
# Record for restoration
blocked_tiles.append({
"position": block_pos,
"original_item": 0,
"original_item": current_item, # Restore the ACTUAL item that was there (e.g. ground 0 or maybe a dropped item?)
"timer": BLOCK_DURATION
})