From a655ce8e47d888d330b9a5f2dd62e0c2ab31580f Mon Sep 17 00:00:00 2001 From: Shard Date: Tue, 31 Mar 2026 12:46:56 +0000 Subject: [PATCH] Fix board click occupant redirect: ignore null occupantId for movement --- Client/origin-client/scenes/game/game_screen.gd | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Client/origin-client/scenes/game/game_screen.gd b/Client/origin-client/scenes/game/game_screen.gd index cc8cfbe..6b1c3c1 100644 --- a/Client/origin-client/scenes/game/game_screen.gd +++ b/Client/origin-client/scenes/game/game_screen.gd @@ -2697,7 +2697,8 @@ func _handle_board_click(mouse_pos: Vector2) -> void: # Occupied tile with no direct unit-mesh hit → redirect to the occupant. if unit_id.is_empty() and coord.x >= 0: var _t := Game.get_tile(coord.x, coord.y) - var _occ := str(_t.get("occupantId", "")) + var _raw_occ = _t.get("occupantId") + var _occ := _raw_occ if _raw_occ is String else "" if not _occ.is_empty() and _occ != "null": unit_id = _occ # Show tile detail drawer and optionally pan camera. @@ -2767,7 +2768,8 @@ func _handle_board_click(mouse_pos: Vector2) -> void: # Occupied tile with no direct unit-mesh hit → redirect to the occupant. if unit_id.is_empty() and coord.x >= 0: var _t2 := Game.get_tile(coord.x, coord.y) - var _occ2 := str(_t2.get("occupantId", "")) + var _raw_occ2 = _t2.get("occupantId") + var _occ2 := _raw_occ2 if _raw_occ2 is String else "" if not _occ2.is_empty() and _occ2 != "null": unit_id = _occ2 if not unit_id.is_empty():