From d3b5b12612d7f3bd530c5b91148607e3878014ef Mon Sep 17 00:00:00 2001 From: Natalie Date: Thu, 25 Jun 2026 06:33:20 -0400 Subject: [PATCH] =?UTF-8?q?refactor(@projects/@magic-civilization):=20?= =?UTF-8?q?=F0=9F=A7=B9=20p3-18=20P5a=20=E2=80=94=20remove=20dead=20GDScri?= =?UTF-8?q?pt=20explicit-embark=20UI=20(single=20source)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit P3b deleted the Civ-V explicit Embark/Disembark actions on the Rust side, leaving the GDScript UI plumbing dangling (it dispatched the now-removed "embark"/ "disembark" actions; gated on the amphibious keyword no unit carries, so it never rendered). Removed it: unit_panel.gd embark_pressed/disembark_pressed signals, their ACTION_SIGNAL_MAP entries + emit cases; world_map.gd signal connections + _on_embark/_on_disembark handlers. No dangling refs remain; no GUT test referenced them. Auto-embark (move onto water) remains the only embark model, now consistent across Rust and the GDScript UI. Remaining P5: the rendered game's movement (pathfinder.gd, GDScript logic) is not yet embark-aware — entangled with the broader Rail-1 debt that rendered movement runs GDScript rather than the Rust pathfinder. Tracked in the objective. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/game/engine/scenes/hud/unit_panel.gd | 9 --------- src/game/engine/scenes/world_map/world_map.gd | 12 ------------ 2 files changed, 21 deletions(-) diff --git a/src/game/engine/scenes/hud/unit_panel.gd b/src/game/engine/scenes/hud/unit_panel.gd index 330c1a32..94a21804 100644 --- a/src/game/engine/scenes/hud/unit_panel.gd +++ b/src/game/engine/scenes/hud/unit_panel.gd @@ -21,9 +21,6 @@ signal sentry_pressed signal pillage_pressed ## p2-53e siege action signal (kind is "pack_siege", "deploy_siege", or "bombard"). signal siege_action_pressed(kind: String) -## p2-53e embark/disembark signals. -signal embark_pressed -signal disembark_pressed ## p2-53f/g/h/i archetype action signal — covers all wave-2 combat/support actions. ## kind matches ActionKind::as_str() exactly. signal archetype_action_pressed(kind: String) @@ -73,8 +70,6 @@ const _KIND_TO_SIGNAL: Dictionary = { "pack_siege": "siege_action_pressed", "deploy_siege": "siege_action_pressed", "bombard": "siege_action_pressed", - "embark": "embark_pressed", - "disembark": "disembark_pressed", # p2-53f infantry — toggle/no-target "shield_wall": "archetype_action_pressed", "unshield_wall": "archetype_action_pressed", @@ -444,10 +439,6 @@ func _on_action_button_pressed(signal_name: String, kind: String = "") -> void: pillage_pressed.emit() "siege_action_pressed": siege_action_pressed.emit(kind) - "embark_pressed": - embark_pressed.emit() - "disembark_pressed": - disembark_pressed.emit() "archetype_action_pressed": archetype_action_pressed.emit(kind) "escort_assign_pressed": diff --git a/src/game/engine/scenes/world_map/world_map.gd b/src/game/engine/scenes/world_map/world_map.gd index 48c222b6..dd54895a 100644 --- a/src/game/engine/scenes/world_map/world_map.gd +++ b/src/game/engine/scenes/world_map/world_map.gd @@ -238,8 +238,6 @@ func _connect_signals() -> void: _unit_panel.build_improvement_pressed.connect(_on_build_improvement_pressed) _unit_panel.pillage_pressed.connect(_on_pillage_pressed_from_panel) _unit_panel.siege_action_pressed.connect(_on_siege_action_pressed_from_panel) - _unit_panel.embark_pressed.connect(_on_embark_pressed_from_panel) - _unit_panel.disembark_pressed.connect(_on_disembark_pressed_from_panel) _unit_panel.patrol_pressed.connect(_on_patrol_pressed_from_panel) _unit_panel.cancel_patrol_pressed.connect(_on_cancel_patrol_pressed_from_panel) _unit_panel.edit_patrol_pressed.connect(_on_edit_patrol_pressed_from_panel) @@ -1577,16 +1575,6 @@ func _make_visible_enemy_validator() -> Callable: return true -## p2-53e: Embark — single-click confirm, no tile-pick. -func _on_embark_pressed_from_panel() -> void: - _invoke_unit_action_direct("embark") - - -## p2-53e: Disembark — single-click confirm, no tile-pick. -func _on_disembark_pressed_from_panel() -> void: - _invoke_unit_action_direct("disembark") - - ## Apply a stateless unit action via unit.invoke_action when available. func _invoke_unit_action_direct(kind: String) -> void: if _selected_unit == null: