spaceship/ui
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Loïc Wisniewski 1ece202731 #138: structures and doctrines cost more than rocks, and more the deeper they are
Both halves of the ticket, in the shape vessels have used since gas bombers
and laser ships: a definition carries an ore figure and, when it wants more
than ore, a dictionary that IS the price. `building_costs()` and
`skill_costs()` answer it the way `product_costs()` already did, so there is
one question with one answer whatever is being bought, and every payment
path now goes through `spend_resources` rather than `spend`.

Seven of ten structures and thirteen of seventeen doctrines now want gas,
energy or dark matter alongside their rocks, and the totals climb with tree
depth - structures 16/31/58/62/96 by depth, doctrines 15/30/73/96/143/258/530.

The constraint that shaped the table is REACHABILITY, and it is the reason
some prices stayed ore-only. Energy exists only where a gas burner stands,
and a gas burner needs Power Systems - so nothing at or before that depth
may be priced in energy, or it is a wall with no way through. Dark matter is
rarer still and appears once, on the deepest node in the game. The extractor
stays rocks-only despite its depth allowing gas, because the quest chain
reaches it before it has sent the player for any.

test_progressive_costs checks those as properties rather than transcribing
the numbers, so rebalancing a price costs nothing while breaking the shape
fails: nothing unreachable at its own depth, prices rising with depth, the
ore field agreeing with the dictionary (repairs quote the field alone, since
a repair drone carries ore and nothing else), and the quest chain never
asking for a structure it has not funded.

Two things cleaned up on the way:

- The per-building cost constants in GameState are gone. Nothing but tests
  used them, and they were a second copy of a number the definitions already
  hold - exactly what would drift once a price gained a resource.
- research_for_building() returns a display NAME, and the id-keyed half of
  the tree wants an id. That mix-up is silent - skill_depth() of a name finds
  no node and answers 0, so a deep structure reads as an ungated one, which
  is how the first draft of the test let an unreachable price through.
  research_node_for_building() is the id, and the name is expressed from it.

PriceTag no longer rebuilds its labels when re-told the same price; it
refreshes the held figures instead. The craft menu re-states prices every
frame and the build menu now does too, so that was a dozen Labels being torn
down and rebuilt sixty times a second.
2026-08-28 15:30:30 +02:00
..
BreachOverlay.gd #125: slow the prologue down, and give the breach a real black hole 2026-08-24 13:25:10 +02:00
BreachOverlay.gd.uid Add the .uid files for the newest tests 2026-08-24 20:50:51 +02:00
DevWaveButton.gd #110: a dev-mode button that puts a wave on the board now 2026-08-23 21:58:58 +02:00
DevWaveButton.gd.uid Add the .uid files Godot generated for the newest scripts 2026-08-24 12:10:41 +02:00
FormationEditor.gd #118/#121: the speed fader and the formation editor under a mouse 2026-08-23 21:59:24 +02:00
FormationEditor.gd.uid #84: move 215 root files into a folder hierarchy 2026-08-21 19:44:14 +02:00
GarrisonPanel.gd #102/#103 (#97d/#97e): the outpost, and the garrison you compose for it 2026-08-23 14:02:20 +02:00
GarrisonPanel.gd.uid Add the .uid files Godot generated for the new scripts 2026-08-23 19:23:50 +02:00
HangarMenuPanel.gd #111/#120: the crafter and hangar panels get room to breathe 2026-08-23 21:59:26 +02:00
HangarMenuPanel.gd.uid Add the .uid files Godot generated for the newest scripts 2026-08-24 12:10:41 +02:00
IconButton.gd #112: every skill node carries an icon 2026-08-23 21:59:27 +02:00
IconButton.gd.uid #84: move 215 root files into a folder hierarchy 2026-08-21 19:44:14 +02:00
MainMenu.gd #84: move 215 root files into a folder hierarchy 2026-08-21 19:44:14 +02:00
MainMenu.gd.uid #84: move 215 root files into a folder hierarchy 2026-08-21 19:44:14 +02:00
MainMenu.tscn #84: move 215 root files into a folder hierarchy 2026-08-21 19:44:14 +02:00
NarrationBanner.gd #128: a dialog stops the game until it is acknowledged 2026-08-28 14:40:46 +02:00
NarrationBanner.gd.uid Add the .uid files Godot generated for the newest scripts 2026-08-24 12:10:41 +02:00
NeonNumber.gd #84: move 215 root files into a folder hierarchy 2026-08-21 19:44:14 +02:00
NeonNumber.gd.uid #84: move 215 root files into a folder hierarchy 2026-08-21 19:44:14 +02:00
NeonPanel.gd #92: shrink the confirm popup to the window it is in 2026-08-22 23:29:44 +02:00
NeonPanel.gd.uid #84: move 215 root files into a folder hierarchy 2026-08-21 19:44:14 +02:00
PaletteEntryButton.gd #84: move 215 root files into a folder hierarchy 2026-08-21 19:44:14 +02:00
PaletteEntryButton.gd.uid #84: move 215 root files into a folder hierarchy 2026-08-21 19:44:14 +02:00
PlanningPanel.gd #106/#107 (#98a/#98b): the Planning Center 2026-08-23 14:21:52 +02:00
PlanningPanel.gd.uid Add the .uid files Godot generated for the new scripts 2026-08-23 19:23:50 +02:00
PriceTag.gd #138: structures and doctrines cost more than rocks, and more the deeper they are 2026-08-28 15:30:30 +02:00
PriceTag.gd.uid #136, #137, #134: one build grid that cannot stack, one way to show a price 2026-08-28 15:05:20 +02:00
QuestTracker.gd #129 (#131, #132, #133): a quest chain, and a World Ship out of reach 2026-08-28 14:41:03 +02:00
QuestTracker.gd.uid #129 (#131, #132, #133): a quest chain, and a World Ship out of reach 2026-08-28 14:41:03 +02:00
ResourceBar.gd #136, #137, #134: one build grid that cannot stack, one way to show a price 2026-08-28 15:05:20 +02:00
ResourceBar.gd.uid #84: move 215 root files into a folder hierarchy 2026-08-21 19:44:14 +02:00
ResourceReadout.gd #84: move 215 root files into a folder hierarchy 2026-08-21 19:44:14 +02:00
ResourceReadout.gd.uid #84: move 215 root files into a folder hierarchy 2026-08-21 19:44:14 +02:00
ResourceTransferList.gd #84: move 215 root files into a folder hierarchy 2026-08-21 19:44:14 +02:00
ResourceTransferList.gd.uid #84: move 215 root files into a folder hierarchy 2026-08-21 19:44:14 +02:00
SkillTreeView.gd #112: every skill node carries an icon 2026-08-23 21:59:27 +02:00
SkillTreeView.gd.uid #84: move 215 root files into a folder hierarchy 2026-08-21 19:44:14 +02:00
SpeedFader.gd #118/#121: the speed fader and the formation editor under a mouse 2026-08-23 21:59:24 +02:00
SpeedFader.gd.uid #84: move 215 root files into a folder hierarchy 2026-08-21 19:44:14 +02:00
TouchJoystick.gd #84: move 215 root files into a folder hierarchy 2026-08-21 19:44:14 +02:00
TouchJoystick.gd.uid #84: move 215 root files into a folder hierarchy 2026-08-21 19:44:14 +02:00
WaveAlert.gd #100 (#97b): waves replace the roaming enemy spawner 2026-08-23 13:37:42 +02:00
WaveAlert.gd.uid Add the .uid files Godot generated for the new scripts 2026-08-23 19:23:50 +02:00