ui/phase-20: ship-group inspector actions
Eight ship-group operations land on the inspector behind a single inline-form panel: split, send, load, unload, modernize, dismantle, transfer, join fleet. Each action either appends a typed command to the local order draft or surfaces a tooltip explaining the disabled state. Partial-ship operations emit an implicit breakShipGroup command before the targeted action so the engine sees a clean (Break, Action) pair on the wire. `pkg/calc.BlockUpgradeCost` migrates from `game/internal/controller/ship_group_upgrade.go` so the calc bridge can wrap a pure pkg/calc formula; the controller now imports it. The bridge surfaces the function as `core.blockUpgradeCost`, which the inspector calls once per ship block to render the modernize cost preview. `GameReport.otherRaces` is decoded from the report's player block (non-extinct, ≠ self) and feeds the transfer-to-race picker. The planet inspector's stationed-ship rows become clickable for own groups so the actions panel is reachable from the standard click flow (the renderer continues to hide on-planet groups). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -194,6 +194,14 @@ const en = {
|
||||
"game.sidebar.order.label.cargo_route_remove": "remove {loadType} route from planet {source}",
|
||||
"game.sidebar.order.label.ship_class_create": "design ship class {name}",
|
||||
"game.sidebar.order.label.ship_class_remove": "remove ship class {name}",
|
||||
"game.sidebar.order.label.ship_group_break": "split group {group} → {quantity} ships into new group",
|
||||
"game.sidebar.order.label.ship_group_send": "send group {group} → planet {destination}",
|
||||
"game.sidebar.order.label.ship_group_load": "load {cargo} × {quantity} onto group {group}",
|
||||
"game.sidebar.order.label.ship_group_unload": "unload × {quantity} from group {group}",
|
||||
"game.sidebar.order.label.ship_group_upgrade": "modernize group {group} {tech} → {level}",
|
||||
"game.sidebar.order.label.ship_group_dismantle": "dismantle group {group}",
|
||||
"game.sidebar.order.label.ship_group_transfer": "transfer group {group} → {acceptor}",
|
||||
"game.sidebar.order.label.ship_group_join_fleet": "assign group {group} → fleet {fleet}",
|
||||
"game.table.ship_classes.title": "ship classes",
|
||||
"game.table.ship_classes.column.name": "name",
|
||||
"game.table.ship_classes.column.drive": "drive",
|
||||
@@ -276,6 +284,54 @@ const en = {
|
||||
"game.inspector.ship_group.fleet.none": "—",
|
||||
"game.inspector.ship_group.unidentified_no_data": "no data — only the radar blip is known",
|
||||
|
||||
"game.inspector.ship_group.action.split": "split",
|
||||
"game.inspector.ship_group.action.send": "send",
|
||||
"game.inspector.ship_group.action.load": "load",
|
||||
"game.inspector.ship_group.action.unload": "unload",
|
||||
"game.inspector.ship_group.action.modernize": "modernize",
|
||||
"game.inspector.ship_group.action.dismantle": "dismantle",
|
||||
"game.inspector.ship_group.action.transfer": "transfer",
|
||||
"game.inspector.ship_group.action.join_fleet": "join fleet",
|
||||
"game.inspector.ship_group.action.confirm": "confirm",
|
||||
"game.inspector.ship_group.action.cancel": "cancel",
|
||||
"game.inspector.ship_group.action.confirm_destroy": "confirm — colonists die",
|
||||
"game.inspector.ship_group.action.disabled.not_in_orbit": "ships are busy ({state}); only orbiting groups accept actions",
|
||||
"game.inspector.ship_group.action.disabled.no_reach": "no planets are within drive range",
|
||||
"game.inspector.ship_group.action.disabled.no_drive": "this ship class has no drive block",
|
||||
"game.inspector.ship_group.action.disabled.no_cargo_block": "this ship class has no cargo block",
|
||||
"game.inspector.ship_group.action.disabled.no_planet": "the orbit planet is not visible",
|
||||
"game.inspector.ship_group.action.disabled.foreign_planet": "this action is only available on your own or unowned planets",
|
||||
"game.inspector.ship_group.action.disabled.empty_cargo": "the group is empty",
|
||||
"game.inspector.ship_group.action.disabled.foreign_unload_col": "colonists cannot be unloaded over a foreign planet",
|
||||
"game.inspector.ship_group.action.disabled.no_headroom": "the group's tech is already at your race level",
|
||||
"game.inspector.ship_group.action.disabled.no_planet_stock": "the planet has no available stock of this cargo",
|
||||
"game.inspector.ship_group.action.disabled.full_load": "the group is fully loaded",
|
||||
"game.inspector.ship_group.action.disabled.no_other_races": "no other non-extinct races to transfer to",
|
||||
"game.inspector.ship_group.action.disabled.unknown_class": "the ship class is missing from the report",
|
||||
"game.inspector.ship_group.action.field.ships": "ships ({max} total)",
|
||||
"game.inspector.ship_group.action.field.cargo": "cargo type",
|
||||
"game.inspector.ship_group.action.field.quantity": "quantity",
|
||||
"game.inspector.ship_group.action.field.level": "tech level",
|
||||
"game.inspector.ship_group.action.field.tech": "tech",
|
||||
"game.inspector.ship_group.action.field.acceptor": "acceptor",
|
||||
"game.inspector.ship_group.action.field.fleet": "fleet name",
|
||||
"game.inspector.ship_group.action.field.destination": "destination planet",
|
||||
"game.inspector.ship_group.action.tech.all": "all blocks",
|
||||
"game.inspector.ship_group.action.tech.drive": "drive",
|
||||
"game.inspector.ship_group.action.tech.weapons": "weapons",
|
||||
"game.inspector.ship_group.action.tech.shields": "shields",
|
||||
"game.inspector.ship_group.action.tech.cargo": "cargo",
|
||||
"game.inspector.ship_group.action.send.pick_prompt": "click a planet on the map (Esc to cancel)",
|
||||
"game.inspector.ship_group.action.send.no_destination": "no destination chosen",
|
||||
"game.inspector.ship_group.action.modernize.cost": "estimated cost: {cost}",
|
||||
"game.inspector.ship_group.action.modernize.cost_unavailable": "cost preview unavailable",
|
||||
"game.inspector.ship_group.action.dismantle.warning": "the group is over a foreign planet with colonists aboard — they will die",
|
||||
"game.inspector.ship_group.action.fleet.create_new": "+ new fleet",
|
||||
"game.inspector.ship_group.action.invalid.ship_count": "ships must be in the range 1…{max}",
|
||||
"game.inspector.ship_group.action.invalid.quantity": "quantity must be greater than zero",
|
||||
"game.inspector.ship_group.action.invalid.level": "level must be in ({current}, {max}]",
|
||||
"game.inspector.ship_group.action.invalid.fleet_name": "fleet name does not match the entity-name rules",
|
||||
|
||||
"game.inspector.planet.ship_groups.title": "stationed ship groups",
|
||||
"game.inspector.planet.ship_groups.row.count": "{count} ships",
|
||||
"game.inspector.planet.ship_groups.row.mass": "mass {mass}",
|
||||
|
||||
Reference in New Issue
Block a user