fixed building walls and moving cassettes around

This commit is contained in:
2026-02-11 09:49:03 +11:00
parent efd6414dfb
commit 78beaca893
5 changed files with 21 additions and 39 deletions

View File

@@ -129,10 +129,15 @@ func process_looking_at_tower() -> void:
func build_wall() -> void:
if point and valid_point and hero.currency >= Data.wall_cost:
hero.currency -= Data.wall_cost
level.set_wall(point, multiplayer.get_unique_id())
networked_set_wall.rpc(point.node_id, multiplayer.get_unique_id())
wall_preview.visible = false
@rpc("reliable", "call_local")
func networked_set_wall(node_id: int, peer_id: int) -> void:
level.set_wall(node_id, peer_id)
func refund_wall(wall: TowerBase) -> void:
if !is_instance_valid(wall):
return