feat: Implement PlayerActionManager for player actions and grid highlighting, SpecialTilesManager for special tile effects, and add freeze/hover tile meshes.

This commit is contained in:
Yogi Wiguna
2026-03-25 15:47:06 +08:00
parent 0616d3a20a
commit 5a6f704569
4 changed files with 14 additions and 11 deletions
+7 -6
View File
@@ -400,7 +400,7 @@ func _execute_area_freeze(target_pos: Vector2i = Vector2i(-9999, -9999)):
else:
NotificationManager.send_message(player, "Hit %d Players!" % hit_count, NotificationManager.MessageType.GOAL)
# Visual Feedback (Overlay Layer 1 - Ground Level Overlay)
# Visual Feedback (Layer 2 - Overlay Level)
if player.is_multiplayer_authority():
var main_node = get_node_or_null("/root/Main")
if main_node and main_node.has_method("sync_grid_items_batch"):
@@ -409,8 +409,8 @@ func _execute_area_freeze(target_pos: Vector2i = Vector2i(-9999, -9999)):
for rz in range(-radius, radius + 1):
var cell_x = center_pos.x + rx
var cell_z = center_pos.y + rz
# Changed to Y=1 (Floor 1) to match Wall visual logic
batch_data.append({"x": cell_x, "y": 1, "z": cell_z, "item": 5})
# Put back on Layer 2 (Overlay) as requested
batch_data.append({"x": cell_x, "y": 2, "z": cell_z, "item": 5})
if not batch_data.is_empty():
main_node.rpc("sync_grid_items_batch", batch_data)
@@ -424,9 +424,10 @@ func _execute_area_freeze(target_pos: Vector2i = Vector2i(-9999, -9999)):
for rz in range(-radius, radius + 1):
var cx = center_pos.x + rx
var cz = center_pos.y + rz
# Check if it is STILL Freeze Overlay on Layer 1
if enhanced_gridmap.get_cell_item(Vector3i(cx, 1, cz)) == 5:
clear_batch.append({"x": cx, "y": 1, "z": cz, "item": -1})
# Check if it is STILL Freeze Overlay on Layer 2
if enhanced_gridmap.get_cell_item(Vector3i(cx, 2, cz)) == 5:
# Remove Item (back to -1)
clear_batch.append({"x": cx, "y": 2, "z": cz, "item": -1})
if not clear_batch.is_empty():
cl_node.rpc("sync_grid_items_batch", clear_batch)
)