Commit Graph

302 Commits

Author SHA1 Message Date
d4889d78c7 Document paused-state vignette border (REQ-UI-PAUSE-BORDER)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-19 21:30:25 +02:00
7d7d730282 Mitre pause-border corners to avoid double-darkening
Clip each side of the pause vignette to a trapezoid so the four gradient
strips meet along the corner diagonals instead of overlapping, which was
compositing two 50% blacks into darker, oddly-shaded corners.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-19 21:25:16 +02:00
91995c57ee Add paused-state vignette border to game world view
Draw a black gradient border (50% alpha at the viewport edges fading to
transparent toward the center) while the game is paused (speed 0x), making
the paused state hard to miss.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-19 21:21:26 +02:00
d4a9d91c5d document the pull-on-demand convention for reading simulation state in the UI
UI widgets hold the Simulation and read authoritative values via getters on
demand; state-change events are refresh signals, not carriers of truth. This
codifies the pattern used by BuildButtonGrid and avoids stale-cache bugs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-19 20:25:01 +02:00
904dc9db6f deselect build tool when it becomes unaffordable and fix stale enabled button
BuildButtonGrid now holds the Simulation and reads the building block stock
on demand, subscribing to BuildingBlocksChangedEvent itself instead of being
driven through MainWindow. When the currently selected build tool can no
longer be afforded, builder mode is exited so the button does not stay
selected or linger enabled after exit. m_activeIndex is now a std::optional.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-19 20:18:20 +02:00
62c26b91f9 Fix restart fast-forwarding by the time spent in a modal dialog
The Game Over, Win, and escape-menu Restart paths did not rebase the
wall-clock time source. Time spent with one of those dialogs open
accumulated in the frame timer and, on the first frame after the reset,
was converted into ticks on the fresh simulation, fast-forwarding the new
run by the dialog-open duration.

resetForNewGame() now restarts m_frameTimer and resets m_tickDriver so a
new run starts from a clean time base. The drained-ResetCommand path
(Game Over / escape) also samples elapsed before the reset applies, so
onFrame() now skips the tick advance on the frame it resets, discarding
that stale delta.

Adds a TickDriver regression test for the invariant the fix relies on.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-19 18:27:32 +02:00
997aecf9f8 Prefix all getters with "get"
Rename bare-noun value accessors to start with "get", per the coding
guideline that a getter's name should begin with "get". Covers simple
nullary accessors across the simulation, balancing, and UI layers
(e.g. currentTick -> getCurrentTick, config -> getConfig,
buildings/belts/ships/scraps/admin, threatLevel, artifactCount,
tilePx, viewportRect, Hasher::value -> getValue, Formula::source ->
getSource).

Left untouched by design: boolean predicates (is*/has*/can*),
verb-named lookups/computations (find*/compute*/peek*/create*),
coordinate transforms, and existing set*-prefixed setters. Test-only
helpers and std/toml++ accessors (optional::value, parse_error::source)
were deliberately not renamed.

Builds clean; all 406 test cases (3222 assertions) pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-19 16:19:28 +02:00
d465671cfc draw beam wider at the source than at the target 0.1.1 2026-07-14 21:52:05 +02:00
76812ba0c5 show "+ installed modules" in ship selection dialog tooltip 2026-07-14 21:23:05 +02:00
9c1e948ab4 show selected ship's current behavior in sidebar panel 2026-07-14 21:19:14 +02:00
23ff406101 display faction in selected object name for hq and defence stations 2026-07-14 21:00:02 +02:00
2ea0cb815d fix issue where items on building's output port were not counted to output display in building panel 2026-07-14 20:50:43 +02:00
876b344b20 fix issue where splitters were draggable during placement like belts 2026-07-14 20:35:47 +02:00
cd75492796 Reveal port items in a thin margin at machine edges 2026-07-14 20:32:27 +02:00
486296feee Allow direct output-to-input port coupling between adjacent buildings 2026-07-14 20:23:24 +02:00
c9f14970a1 Animate items entering building input ports 2026-07-14 20:21:25 +02:00
6a8c456aa1 Animate items emerging from building output ports 2026-07-14 20:18:47 +02:00
af8a2224c0 fix issue where items were accepted by a belt from opposite travel direction 2026-07-14 20:15:39 +02:00
4b149d97a7 dim the game behind dialogs and escape menu 2026-07-13 22:11:21 +02:00
6a8b6acd3b make panning faster 2026-07-13 21:44:12 +02:00
3ce6e6d599 Tint not-yet-buildable asteroid area 2026-07-13 21:42:59 +02:00
80a2622267 Redefine camera scroll as view center 2026-07-13 21:31:52 +02:00
535d4f8f24 allow to (multi) select scrap 2026-07-13 21:09:01 +02:00
8c4fb78fc9 Allow creating blueprints from construction sites 2026-07-13 20:50:13 +02:00
698dd4d13d auto-open layout dialog on manual schematic change 2026-07-13 20:47:37 +02:00
9d28175b17 Always show shipyard layout preview and Configure button, disabled until schematic selected 2026-07-13 20:45:03 +02:00
ac4d56764c Draw a thin border around each right-sidebar panel 2026-07-13 20:44:47 +02:00
69fe607157 Show total building block cost in multi-selection panel (relevant for temporary blueprint) 2026-07-13 20:31:40 +02:00
92e896b973 fix tooltip text rendering issue 2026-07-12 21:56:59 +02:00
dd7c997816 Auto-process smelter and reprocessing plant (no recipe selection) 2026-07-12 21:35:23 +02:00
ad3e73fdd8 Add tooltip for building blocks in header bar 2026-07-12 21:24:11 +02:00
177809fe1a Add tooltips for building buttons and module selection buttons 2026-07-12 21:21:14 +02:00
69f655d179 Rename UI "Blocks" labels to "Building Blocks" 2026-07-12 21:17:10 +02:00
271855781c add tag based version info to exe 0.1.0 2026-07-12 09:16:49 +02:00
5f6ecbf6c8 implement visual feedback for copy building settings with shift + click gesture 2026-07-09 21:33:24 +02:00
cd966daba9 fix issue where shipyard produces ships with modules without requiring items for the modules if the ship's layout was never changed 2026-07-09 21:29:04 +02:00
88bc4f2170 fix bug where selecting the same ship again in a shipyard clears the layout and resets the progress 2026-07-09 21:05:01 +02:00
4986c1bac8 implement copy building settings with shift + click gesture 2026-07-09 20:29:20 +02:00
e110e7e413 Add T hotkey for temporary blueprint from selection 2026-07-09 20:25:15 +02:00
6274b5ce60 List unlocked recipes with tooltips in schematic choice dialog instead of unlocked item names 2026-07-09 20:22:17 +02:00
16ed6a5695 Show schematic id for all three types of drops in choice dialog 2026-07-09 20:18:38 +02:00
13dacab274 remove save and load buttons for factory blueprints to mirror the ship-layout blueprints 2026-07-09 20:15:30 +02:00
2ddf13238c Fix Salvage Bay drop-off not working by adding config-driven buffer capacity 2026-07-09 20:11:12 +02:00
cc38bf95fa make repair_tool less op 2026-07-09 07:20:06 +02:00
b58bcfe272 turn around salvage bay in config 2026-07-09 07:19:48 +02:00
de1ebb8a5f increase scroll speed across contest zone 2026-07-08 22:25:12 +02:00
24c18f8ac6 render HP bar below the HQ 2026-07-08 21:39:11 +02:00
2cedd5d433 fix issue where building selection outline is hidden by other buildings drawn later 2026-07-08 21:29:44 +02:00
f11db0c072 Add demolish box-drag interaction 2026-07-08 21:04:59 +02:00
808e0c6a7b Fix recipe button unclickable on construction site during play 2026-07-08 20:46:26 +02:00