Transport Hub building #18

Closed
opened 2026-08-11 13:36:43 +00:00 by metaheavens · 1 comment
Owner

Part 5 of #12. Depends on the building-stock ticket.

A new placeable building that hosts transport ships. This ticket is only the building itself - placement, cost, art, info popup, map marker, and being gated behind research like the others.

Scope

  • New building type in GameState, buildable via BuildController with its own info popup (BUILDING_INFO).
  • Neon art in Building.gd following the draw-once architecture from #10: static geometry drawn ONCE in _draw(), anything that moves is a NeonPiece child animated through node properties. Do NOT animate with per-frame queue_redraw().
  • Build-menu icon distinct from the existing buildings (they were once indistinguishable and it made the menu unreadable).
  • Map marker, per #11.
  • A skill-tree node gating it.

Deliberately not here: transporter vessels and any actual hauling.

Acceptance

  • Placeable, costed, gated, and visible on the map.
  • Rendered and looked at, not just headless-tested.
Part 5 of #12. Depends on the building-stock ticket. A new placeable building that hosts transport ships. This ticket is only the building itself - placement, cost, art, info popup, map marker, and being gated behind research like the others. **Scope** - New building type in `GameState`, buildable via `BuildController` with its own info popup (`BUILDING_INFO`). - Neon art in `Building.gd` following the draw-once architecture from #10: static geometry drawn ONCE in `_draw()`, anything that moves is a `NeonPiece` child animated through node properties. Do NOT animate with per-frame `queue_redraw()`. - Build-menu icon distinct from the existing buildings (they were once indistinguishable and it made the menu unreadable). - Map marker, per #11. - A skill-tree node gating it. **Deliberately not here:** transporter vessels and any actual hauling. **Acceptance** - Placeable, costed, gated, and visible on the map. - Rendered and looked at, not just headless-tested.
Author
Owner

Done in 823828f. The building only - the vessels that do the hauling are #19.

Placeable, costed at 30, gated behind a new Freight Handling research node hanging off Logistics, with its own info popup, build-menu glyph and map marker (per #11).

Drawn as an octagonal dock ring with berth arms and a squared-off freight core - deliberately radial-but-flat, so it does not read as a small mothership, which is the only structure with swept arms. Its stationed transports are NeonPiece children of one rotating holder, per #10: the geometry is rasterised once and only the holder's rotation changes, so the traffic costs no redraws at all. The test confirms draw_count == 1 after two seconds of animation AND that the transports actually moved, so a frozen hub cannot pass it.

A silent failure worth recording

Building._draw()'s match has a catch-all that renders anything unrecognised as a ship crafter. So a missing case is not an error - it draws something plausible and almost right.

That is exactly what happened: one of my _ready() patches silently did not apply (wrong indentation, so the string replace matched nothing), and the hub was being built through the crafter branch. The test caught it because it checks for the hub's OWN _hub_traffic holder rather than just "a building appeared". Anything looser would have passed.

The build menu needed rebuilding, and the render caught that too

A fifth entry did not fit. The old row occupied 332px against a 372px pitch, and three of those run off the bottom of a 1280px screen.

My first attempt just tightened the pitch to 275 - which is less than the row height, so every price overlapped the buttons in the row below. Nothing in the test suite can see that. The render made it obvious immediately. Rows are now genuinely shorter (128px buttons, 40px price digits) at a 290px pitch, ending at y=1176, and all five buildings show cleanly.

tests/_build_menu_preview.tscn is checked in so the menu can be re-checked whenever it changes again.

Full suite: 45/45.

Done in 823828f. The building only - the vessels that do the hauling are #19. Placeable, costed at 30, gated behind a new **Freight Handling** research node hanging off Logistics, with its own info popup, build-menu glyph and map marker (per #11). Drawn as an octagonal dock ring with berth arms and a squared-off freight core - deliberately radial-but-flat, so it does not read as a small mothership, which is the only structure with swept arms. Its stationed transports are `NeonPiece` children of one rotating holder, per #10: the geometry is rasterised once and only the holder's rotation changes, so the traffic costs no redraws at all. The test confirms `draw_count == 1` after two seconds of animation AND that the transports actually moved, so a frozen hub cannot pass it. ## A silent failure worth recording `Building._draw()`'s `match` has a catch-all that renders anything unrecognised as a ship crafter. So a missing case is not an error - it draws something plausible and almost right. That is exactly what happened: one of my `_ready()` patches silently did not apply (wrong indentation, so the string replace matched nothing), and the hub was being built through the crafter branch. The test caught it because it checks for the hub's OWN `_hub_traffic` holder rather than just "a building appeared". Anything looser would have passed. ## The build menu needed rebuilding, and the render caught that too A fifth entry did not fit. The old row occupied 332px against a 372px pitch, and three of those run off the bottom of a 1280px screen. My first attempt just tightened the pitch to 275 - which is *less than the row height*, so every price overlapped the buttons in the row below. Nothing in the test suite can see that. The render made it obvious immediately. Rows are now genuinely shorter (128px buttons, 40px price digits) at a 290px pitch, ending at y=1176, and all five buildings show cleanly. `tests/_build_menu_preview.tscn` is checked in so the menu can be re-checked whenever it changes again. Full suite: **45/45**.
metaheavens referenced this issue from a commit 2026-08-11 18:31:47 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
metaheavens/spaceship#18
No description provided.