spaceship/ui/menus
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Claude 34e252037e #231, #230: a key per ability, and an upkeep sheet that adds up
#231 - the abilities were hard to use on a keyboard.

"The currently selected weapons" names a real mechanism: MouseCombatController
(#80) has number keys that SELECT which weapon a click fires. That is two
acts for one shot, and the selection is invisible unless you look at the
buttons. Q, E and space now fire the gas bomb, the laser and the dash
outright, wherever the mouse already points.

It goes through fire_at(), the same public entry the click path uses, so
every guard comes with it - no hull ready, cannot afford the shot, a panel
over the button. The number keys stay: they are not what this ticket is
about, and removing them would take the click path's abilities with them.

Q and E were already taken - they pivot the formation - so the pivot pair
moved to Z and C, one row under the movement keys and still left-hand. That
is a change to a control the ticket did not mention, and the one thing here
worth arguing with.

test_keyboard_input spelled Q and E out and so reported a broken pivot when
the pivot was fine. It reads KEY_PIVOT_CW/CCW off the controller now, and
additionally asserts the pair is not bound to an ability key - the failure
that would actually matter.

#230 - the upkeep menu never added anything up.

Two faults, and the second is invisible from the code. There was no TOTAL,
so the bill had to be done in the player's head. And the rows were one Label
padded with %-16s, which aligns only in a monospace font - the theme's is
CarroisGothicSC, which is proportional - with autowrap on top, so a long row
folded and the table lost its shape.

A real GridContainer now: header, a row per paying berth, and a TOTAL. The
headline carries both figures, because they answer different questions - the
per-charge bill is what the player watches happen, the per-minute rate is
what they plan against.

Amounts are listed in the game's resource order rather than the dictionary's.
The screenshot showed "2 ore 1 energy" on one row above "2 gas 2 ore" on the
next, which defeats the point of a column.

The sheet is rebuilt only when the numbers change. BuildController refreshes
this menu every frame while it is open, and rebuilding a dozen Labels per
frame for figures that move every 25 seconds is what #6 and #10 are about.
The test refreshes twice and asserts the same cell objects come back.

Every figure still comes from fleet_upkeep_breakdown(), the calculation the
charging loop itself runs - the new total sums those same per-berth costs
rather than recomputing them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019AJMdB7iuHuLFZM1aBu3GD
2026-09-15 23:44:17 -04:00
..
BuildMenu.gd Refactor gameplay menus into owned scenes 2026-08-31 02:18:08 +02:00
BuildMenu.gd.uid Refactor gameplay menus into owned scenes 2026-08-31 02:18:08 +02:00
BuildMenu.tscn Buy fleet berths with Fleet Offices 2026-09-05 17:09:27 +02:00
CraftMenu.gd Offer only orderable vessels, and read out crew condition 2026-09-06 11:58:15 +02:00
CraftMenu.gd.uid Refactor gameplay menus into owned scenes 2026-08-31 02:18:08 +02:00
CraftMenu.tscn Build the logistics crews, and let them burn energy 2026-09-05 19:09:35 +02:00
DevMenu.gd Add a free-costs sandbox tool 2026-09-04 22:34:36 +02:00
DevMenu.gd.uid Turn dev mode into sandbox menu 2026-09-03 20:05:33 +02:00
DevMenu.tscn Add a free-costs sandbox tool 2026-09-04 22:34:36 +02:00
FleetUpkeepMenu.gd #231, #230: a key per ability, and an upkeep sheet that adds up 2026-09-15 23:44:17 -04:00
FleetUpkeepMenu.gd.uid Keep the export probe, and the uid files beside the new scripts 2026-09-07 16:40:45 +02:00
FleetUpkeepMenu.tscn #231, #230: a key per ability, and an upkeep sheet that adds up 2026-09-15 23:44:17 -04:00
FormationMenu.gd Refactor gameplay menus into owned scenes 2026-08-31 02:18:08 +02:00
FormationMenu.gd.uid Refactor gameplay menus into owned scenes 2026-08-31 02:18:08 +02:00
FormationMenu.tscn Restore landing fade and missing event sounds 2026-08-31 18:15:37 +02:00
GarrisonMenu.gd Refactor gameplay menus into owned scenes 2026-08-31 02:18:08 +02:00
GarrisonMenu.gd.uid Refactor gameplay menus into owned scenes 2026-08-31 02:18:08 +02:00
GarrisonMenu.tscn Refactor gameplay menus into owned scenes 2026-08-31 02:18:08 +02:00
HangarMenu.gd Refactor gameplay menus into owned scenes 2026-08-31 02:18:08 +02:00
HangarMenu.gd.uid Refactor gameplay menus into owned scenes 2026-08-31 02:18:08 +02:00
HangarMenu.tscn Refactor gameplay menus into owned scenes 2026-08-31 02:18:08 +02:00
LabMenu.gd Plan every craftable vessel, and stop restating the point cost 2026-09-05 23:13:23 +02:00
LabMenu.gd.uid Refactor gameplay menus into owned scenes 2026-08-31 02:18:08 +02:00
LabMenu.tscn Complete lab, quest, garrison, and energy tickets 2026-09-03 00:12:08 +02:00
MenuLayout.gd Refactor gameplay menus into owned scenes 2026-08-31 02:18:08 +02:00
MenuLayout.gd.uid Refactor gameplay menus into owned scenes 2026-08-31 02:18:08 +02:00
ModalMenu.gd Refactor gameplay menus into owned scenes 2026-08-31 02:18:08 +02:00
ModalMenu.gd.uid Refactor gameplay menus into owned scenes 2026-08-31 02:18:08 +02:00
PlanningMenu.gd Refactor gameplay menus into owned scenes 2026-08-31 02:18:08 +02:00
PlanningMenu.gd.uid Refactor gameplay menus into owned scenes 2026-08-31 02:18:08 +02:00
PlanningMenu.tscn Refactor gameplay menus into owned scenes 2026-08-31 02:18:08 +02:00
ResearchPointsMenu.gd Teach where research data comes from, and say so when it runs out 2026-09-06 16:24:09 +02:00
ResearchPointsMenu.gd.uid Keep the export probe, and the uid files beside the new scripts 2026-09-07 16:40:45 +02:00
ResearchPointsMenu.tscn Teach where research data comes from, and say so when it runs out 2026-09-06 16:24:09 +02:00
ScannerMenu.gd Add planet scanner and octopus biome 2026-09-04 15:56:07 +02:00
ScannerMenu.gd.uid Buy fleet berths with Fleet Offices 2026-09-05 17:09:27 +02:00
ScannerMenu.tscn Add planet scanner and octopus biome 2026-09-04 15:56:07 +02:00
SkillMenu.gd Resolve pending gameplay tickets 2026-09-02 13:43:56 +02:00
SkillMenu.gd.uid Refactor gameplay menus into owned scenes 2026-08-31 02:18:08 +02:00
SkillMenu.tscn Refactor gameplay menus into owned scenes 2026-08-31 02:18:08 +02:00
StationMenu.gd Stop redrawing what only needs moving 2026-09-08 11:35:45 +02:00
StationMenu.gd.uid Keep the export probe, and the uid files beside the new scripts 2026-09-07 16:40:45 +02:00
StationMenu.tscn Stop redrawing what only needs moving 2026-09-08 11:35:45 +02:00
TransferMenu.gd Refactor gameplay menus into owned scenes 2026-08-31 02:18:08 +02:00
TransferMenu.gd.uid Refactor gameplay menus into owned scenes 2026-08-31 02:18:08 +02:00
TransferMenu.tscn Refactor gameplay menus into owned scenes 2026-08-31 02:18:08 +02:00