Commit Graph

283 Commits

Author SHA1 Message Date
ba0c10d54e Allow creating blueprints from construction sites
Blueprint capture and the Create Blueprint enable check previously
resolved each selected id via findBuilding() only, silently dropping
construction sites. Extract the capture logic into two testable lib/sim
helpers (captureBlueprintFromSelection, selectionHasPlaceableBuilding)
that resolve each id as an operational building or a construction site
alike, reusing readBuildingConfig for recipe/schematic/layout/splitter
config. BlueprintPanel now delegates to them.

Add regression tests covering site capture, site recipe capture, mixed
operational+site selection, and the placeable-selection predicate.

Implements REQ-UI-BLUEPRINT-CREATE / REQ-UI-BLUEPRINT-STORAGE.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZR44tA8sn4dPqDzAVXyps
2026-07-13 19:35:17 +02:00
be8f95bd11 Allow creating blueprints from construction sites
Make explicit in REQ-UI-BLUEPRINT-CREATE and REQ-UI-BLUEPRINT-STORAGE
that a selected construction site is a valid blueprint source,
captured identically to an operational building.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZR44tA8sn4dPqDzAVXyps
2026-07-13 18:47:10 +02:00
3476cebb9e Auto-open layout dialog when a new shipyard schematic is selected
Implement REQ-MOD-UI-AUTO-DIALOG: picking a new schematic for a shipyard
via the manual selection dialog now opens the layout configuration dialog
immediately. Only triggers on an actual schematic change; copy-settings
and blueprint placement are unaffected.

Extract the ShipLayoutDialog-opening logic into a reusable
MainWindow::openShipLayoutDialog helper. Because SetRecipeCommand is
queued and clears the layout, the auto-open passes the chosen schematic
and an empty layout explicitly rather than reading stale building state.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZR44tA8sn4dPqDzAVXyps
2026-07-13 09:13:14 +02:00
2e657b63fe Add REQ-MOD-UI-AUTO-DIALOG: auto-open layout dialog on schematic change
Selecting a new schematic for a shipyard via the manual selection dialog
now auto-opens the layout configuration dialog. Excludes copy-settings
and blueprint placement; only triggers on an actual schematic change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZR44tA8sn4dPqDzAVXyps
2026-07-13 08:05:21 +02:00
6dd8da4ff8 Always show shipyard layout preview and Configure button, disabled until schematic selected
The ship layout preview and Configure Layout button are now always shown
for a selected shipyard and disabled while no schematic is selected,
rather than being hidden. The preview shows an empty placeholder box in
that state. Update REQ-MOD-UI-PREVIEW to match.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZR44tA8sn4dPqDzAVXyps
2026-07-13 07:40:21 +02:00
851eeff6f4 Draw a thin border around each right-sidebar panel
Enable WA_StyledBackground on the three side-panel sections and apply a
class-scoped stylesheet border so each panel gets a thin outline without
the rule cascading onto child widgets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZR44tA8sn4dPqDzAVXyps
2026-07-13 07:18:20 +02:00
eb1572cd80 Show total building block cost in multi-selection panel
Implement the REQ-UI-MULTI-SELECTION addition: the selected building
panel now shows the total placement cost of a multi-selection, counting
only player-placeable buildings (HQ and defence stations excluded).
Construction sites are charged their type's full cost.

Add a shared BuildingsConfig::findBuildingDef accessor and reuse it in
BlueprintPanel to remove the duplicated by-type lookup loops.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZR44tA8sn4dPqDzAVXyps
2026-07-13 07:13:29 +02:00
9143cb1b40 Add total building block cost to multi-selection panel requirement
Extend REQ-UI-MULTI-SELECTION to show the sum of placement costs for
player-placeable buildings in the selection, excluding HQ/defence
stations, consistent with the blueprint total.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZR44tA8sn4dPqDzAVXyps
2026-07-12 21:54:51 +02:00
2a4bd0b066 Auto-process smelter and reprocessing plant (no recipe selection)
Bring the code in line with REQ-BLD-SMELTER, REQ-BLD-REPROCESSING, and
REQ-UI-SELECT-BUTTON: the Smelter and Reprocessing Plant no longer require a
player-selected recipe.

Simulation: auto-recipe buildings init input caps from the union of their
type's recipe inputs, accept any matching item, and each idle tick run the
first recipe whose inputs are satisfied (reprocessing keeps its weighted roll).
setRecipe is a no-op for these types.

UI: the recipe-select button is hidden for auto-recipe buildings; the selected
building panel still shows buffers and production progress using the recipe
currently in production.

Tests: drop the obsolete setRecipe calls; add smelter auto-smelt coverage,
including the mixed-input case where a satisfiable recipe runs while an
incomplete batch of another input waits.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZR44tA8sn4dPqDzAVXyps
2026-07-12 21:30:30 +02:00
3d4c0445d1 Add config-defined tooltip to header building blocks stock
Implement REQ-UI-BLOCKS-TOOLTIP: an optional world.toml
[world].building_blocks_tooltip, threaded into HeaderBar via a new
const GameConfig* parameter and shown as the building blocks stock label's
hover tooltip. Omitted when unset. Author the text in the app config and
extend ConfigLoaderTest to cover the field.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZR44tA8sn4dPqDzAVXyps
2026-07-12 20:37:22 +02:00
cd8bf1a8b3 Add requirement for config-defined building blocks tooltip
Introduce REQ-UI-BLOCKS-TOOLTIP: an optional world.toml
[world].building_blocks_tooltip shown as the header bar's building blocks
stock hover tooltip. Note the optional field in the world.toml description.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZR44tA8sn4dPqDzAVXyps
2026-07-12 18:23:51 +02:00
c4d696c79e Add config-defined tooltips to build and module buttons
Implement REQ-UI-BUILD-TOOLTIP and REQ-MOD-UI-MODULE-TOOLTIP: an optional
tooltip string on BuildingDef and ModuleDef, parsed from buildings.toml and
modules.toml and shown as the build/module button's hover tooltip. Omitted
when unset. Author descriptions for all buildings and modules in the app
config, and extend ConfigLoaderTest to cover the optional field.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZR44tA8sn4dPqDzAVXyps
2026-07-12 17:56:09 +02:00
1add02eafa Add requirements for config-defined build/module button tooltips
Introduce REQ-UI-BUILD-TOOLTIP and REQ-MOD-UI-MODULE-TOOLTIP, and note
the optional tooltip fields in buildings.toml and modules.toml.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZR44tA8sn4dPqDzAVXyps
2026-07-12 16:35:05 +02:00
129200ff4f Rename UI "Blocks" labels to "Building Blocks"
Make user-visible terminology consistent across the header bar, build
button grid, and blueprint panel.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZR44tA8sn4dPqDzAVXyps
2026-07-12 15:15:41 +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
e4ea4ca4b4 Refresh selected-building panel when paused player commands drain 2026-07-08 20:45:41 +02:00
fef22b9f86 Fix shipyard layout preview/button not showing until re-selection 2026-07-08 20:45:25 +02:00
cdf89ce0dd Restructure balancing docs into docs/balancing/ 2026-07-08 20:33:51 +02:00
e8786c3922 implement cost formula for asteroid expansion 2026-07-08 20:33:19 +02:00
fc622670d2 continue first full balancing round 2026-07-08 20:33:11 +02:00
e32d384c99 fix bug where balancing matches did not finish until enemy hq was destroyed 2026-07-08 20:31:33 +02:00
24e0999d8a show total time in balancing target arenas 2026-07-08 20:31:14 +02:00
fcaee000fa continue first full balancing round 2026-07-08 20:30:45 +02:00
751ef27a7b show team EHP in balancing target 2026-07-08 20:29:41 +02:00
3c1376828c implement logging of arena states 2026-07-08 20:29:33 +02:00
bd0675db66 continue first full balancing round 2026-07-08 20:29:23 +02:00
5b86b15c71 Fix ThreatCostCalculator: per-unit division, scrap fallback, fixpoint, staggered-recipe max 2026-07-08 20:28:31 +02:00
c6db4bf24a first full balancing round 2026-07-08 20:27:25 +02:00
6ea0655eaf implement unlock dependencies 2026-07-03 08:35:45 +02:00
58d4586d00 update concept.md 2026-07-02 21:36:42 +02:00
18e732ae99 Remove schematic upgrades and module and ship levels 2026-07-02 21:32:36 +02:00
81b1c7a66b Derive ship scrap drop from threat 2026-07-02 21:30:38 +02:00
5bc581bcb8 write replays next to the executable 2026-07-01 22:43:04 +02:00
0a7e9a34ef Add artifact win condition (#3)
Reviewed-on: #3
Co-authored-by: Malte Langkabel <malte.langkabel@gmail.com>
Co-committed-by: Malte Langkabel <malte.langkabel@gmail.com>
2026-07-01 20:27:29 +00:00