refactor(@projects/@magic-civilization): 🧹 p3-18 P5a — remove dead GDScript explicit-embark UI (single source)

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) <noreply@anthropic.com>
This commit is contained in:
Natalie 2026-06-25 06:33:20 -04:00
parent 11988d60a6
commit d3b5b12612
2 changed files with 0 additions and 21 deletions

View file

@ -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":

View file

@ -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: