Commit Graph

80 Commits

Author SHA1 Message Date
a83dd33c5c Make railgun S/M/L distinct via barrel count (1/2/3)
Railgun M was a single barrel like S, so they read the same at 16px.
Reworked M to two barrels and L to three (was two), giving a clear
1/2/3-barrel tier ladder. viewBoxes tightened to fill the slot.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-23 21:28:08 +02:00
4461d17737 Tighten item icon viewBoxes so art fills the slot
Each icon's viewBox is set to a square box around its actual content
(with a stroke-width margin + small breathing room), leaving the path
data unchanged. Under-filled icons (ingots, plates, silicon, etc.) now
scale up and recenter to fill the half-tile item slot; already-full
icons are left as-is (clamped to only ever zoom in). Fixes items looking
too small in the game world.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-23 21:23:43 +02:00
c909920ac9 Give building_block icon a paneled cube (more structure)
Recessed panel inset per face on the isometric cube, replacing the flat
faces, per Malte's request for more structure.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-23 20:04:25 +02:00
09e7e6b2e8 Add item icon art for all 41 item types
Self-contained full-color SVGs in data/icons/items/, one per item id, read
by the recipe-selection dialog (REQ-UI-RECIPE-ICON) and belt/port rendering
(REQ-UI-ITEM-ICON). Bold silhouette + dark outline, authored to stay legible
at ~16px belt size: rocky ore chunks, isometric ingots, riveted plates,
copper coil/wire, pictorial module devices, and dart hull silhouettes tinted
per fleet color. No config changes needed — each recipe's icon resolves to
its first output.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-23 19:29:33 +02:00
51e45e10a1 Rename scrap-drop entity to "debris" in code and config
Implements the requirements rename in the codebase. The salvageable object
dropped by destroyed ships and defence stations is now the "debris" entity;
the scrap resource it yields (cargo, delivery, smelting, threat,
scrap_drop_formula, scrap_per_threat) is unchanged.

Entity renames: ScrapDataComponent->DebrisComponent, ScrapSystem->DebrisSystem,
ScrapInfo->DebrisInfo, ScrapSelectionChangedEvent->DebrisSelectionChangedEvent
(member scrap->debris), spawnScrap->spawnDebris, getScraps->getDebrisSystem,
getAllScrapInfo->getAllDebrisInfo, scrapAtWorldPos/scrapInBox->debris*,
SalvageScrapBehavior::scrapTarget->debrisTarget, PendingCollection::scrap->debris,
ScrapTest.cpp->DebrisTest.cpp. Config key scrap_despawn_seconds->
debris_despawn_seconds (WorldConfig.scrapDespawnSeconds->debrisDespawnSeconds).
The salvage/deliver behavior classes keep their names (they act on the scrap
resource).

Also implements the new REQ-UI-DEBRIS-PANEL behavior in SelectedBuildingPanel:
a single selected piece of debris shows a "Debris" heading plus a "Scrap" stat
row; a multi/mixed field selection appends "Debris x N" and "Scrap x N" lines.

Updates the four renamed REQ-ID references in comments/docs, plus architecture.md
and derived.md. All 449 test cases pass; app, tests, and balancing targets build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-23 13:10:04 +02:00
3a25de6c22 Add HQ and station icons; redesign tunnel build-button icon
Add hq.svg (flag-base command building) and station.svg (shield, rendered
glyph-only over each side's fill) for in-world building icons. Redraw
tunnel_entry.svg as the shared Tunnel build button: the belt runs on the
surface at both ends and drops straight into/out of the ground, with rounded
corners and a single exit tip. No belt/splitter/tunnel world icons.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-22 22:11:36 +02:00
c479291c1b Reapply build button grid icons
Revert of "Undo build button grid icons" (614dda8): restore the per-building
SVG icons, the QtSvg-based icon loading in BuildButtonGrid, the icon dir
plumbing in MainWindow, and the Qt5::Svg dependency.

This returns the unlock-groups branch to having the icons. The preceding
undo commit exists only so the Demolish -> Deconstruct rename can be
cherry-picked on its own (rename+icons commit together with the undo).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-22 19:48:15 +02:00
614dda8daf Undo build button grid icons
Remove the per-building SVG icons and all their wiring (the icon assets,
the QtSvg-based icon loading in BuildButtonGrid, the icon dir plumbing in
MainWindow, and the Qt5::Svg dependency), leaving only the Demolish ->
Deconstruct rename from the previous commit.

This is the inverse of the icon half of the previous commit, paired with a
following revert that re-adds the icons. Cherry-picking the previous
"rename + icons" commit together with this undo reconstructs the rename on
its own.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-22 19:47:58 +02:00
ae41f677e6 Rename Demolish to Deconstruct; add build button grid icons
Rename the Demolish* terminology to Deconstruct* across the simulation,
events, UI, tests, and docs (DemolishCommand and the DemolishMode* events
become their Deconstruct* equivalents), aligning with the deconstruction
queue at HEAD.

Add per-building SVG icons for the build button grid (REQ-UI-BUILD-GRID):
one color-chip icon per placeable building under data/icons/buildings,
loaded from disk at runtime and rendered with QtSvg onto each build button.
An unaffordable building's button shows a grey-recolored variant via a
QIcon Disabled-mode pixmap (REQ-UI-BUILD-DISABLED). Adds the Qt5::Svg
dependency and deploys Qt5Svg.dll.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-22 18:38:18 +02:00
1914705ab9 Implement the deconstruction queue
Demolishing a fully-built building now queues it for timed deconstruction
(world.toml deconstruction_time_seconds, default 0.1) running in parallel
with the construction queue, instead of removing it instantly. The partial
refund is credited on completion. A queued building stops operating at once
(belt/tunnel/splitter tiles unregister from the belt subsystem, re-pairing
tunnels) but keeps occupying its tiles. Construction sites are still removed
instantly with the full refund.

Clicking a queued building un-queues it (new CancelDeconstructionCommand);
a demolish drag-box un-queues all covered built buildings when they are all
already queued, otherwise queues the rest. Queued buildings render with the
demolish tint. Implements REQ-BLD-DECON-QUEUE and the updated
REQ-BLD-DEMOLISH / REQ-BLD-DEMOLISH-CLICK / REQ-BLD-DEMOLISH-BOX /
REQ-BLD-TUNNEL-PAIR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-22 12:59:27 +02:00
1f339bd8d7 Implement config-driven unlock groups
Lift unlocking into first-class unlock groups defined in unlocks.toml, so
one defence-station drop can grant a bundle of ships/modules/buildings/
recipes at once (e.g. the salvager module + salvage bay), and buildings
can now be locked at game start and unlocked via a drop.

Config:
- New UnlocksConfig + ConfigLoader::loadUnlocks + validateUnlocks (unknown/
  duplicate/non-assembler grants, unknown requires, empty group all fail load).
- Drop unlock_at_station_level/unlock_requires from ship/module/recipe defs;
  add unlocked_at_start bool to recipes for graph-unreachable base recipes.

Simulation:
- Track awarded groups + per-building unlock state; an item starts unlocked
  iff no group grants it. Rework generateSchematicChoices/applySchematicChoice
  to operate on groups (grant all members at once). Extend state checksum.
- isBuildingUnlocked query; tryPlaceBuilding rejects locked types.

UI:
- Build-menu buttons for locked buildings start hidden, revealed via a new
  UnlockedBuildingsChangedEvent (emitted from GameWorldView's poll loop).
- Schematic choice dialog lists a group's granted items.
- Blueprint placement excludes locked building types (REQ-LOCK-UI-BLUEPRINT).

Data: unlocks.toml (app + test) reproduces the prior per-item gates as
singleton groups and adds salvage_operations (salvager + salvage_bay, lvl 1)
and reprocessing (reprocessing_plant, lvl 2).

Tests: rewrote unlock/config/recipe-schematic/artifact/wave/shipyard tests
for the group model; added UnlockGroupTest. All 443 cases pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-21 22:38:38 +02:00
9b63af6ccb Unify tunnel build mode into a single Tunnel button 2026-07-21 21:12:06 +02:00
1cbc695bc5 Add building status light 2026-07-20 22:19:58 +02:00
f205136e21 show tooltip for artifacts in the header bar 2026-07-19 22:16:04 +02:00
08752aeced fix building blocks tooltip 2026-07-19 21:14:31 +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
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
5f6ecbf6c8 implement visual feedback for copy building settings with shift + click gesture 2026-07-09 21:33:24 +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
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
fcaee000fa continue first full balancing round 2026-07-08 20:30:45 +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
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
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
b301db2008 increase refund rate because altering the factory shall not be punishing 2026-06-23 22:11:30 +02:00
9573b9789a change repair_tool application and add beams for salvager and repair_tool 2026-06-19 21:15:47 +02:00
7924e037aa increase asteroid size 2026-06-18 21:48:43 +02:00
313fed02ca fix range of repair tool in config 2026-06-17 22:39:10 +02:00
1a682fdb79 make drone movement look more spaceship-like 2026-06-17 20:51:45 +02:00
5219b227c5 improve targeting rules config 2026-06-16 21:51:45 +02:00
ac97652c60 make ships claim targets 2026-06-16 21:18:28 +02:00
4153b7e2f5 make ships orbit their targets 2026-06-15 21:37:47 +02:00
997a7778e0 first iteration of fable 5 on ship and module grids and recipes 2026-06-14 14:23:53 +02:00
10c5ad678f derive threat cost dynamically 2026-06-13 22:47:46 +02:00
49f7129bd5 schematic selection dialog 2026-06-13 14:19:51 +02:00
1641189b75 explicit recipe unlocking 2026-06-12 17:15:06 +02:00
69b35d2bfc fix config 2026-06-10 22:37:46 +02:00
af96b95f61 allow to unlock modules when destroying defence stations 2026-06-10 22:37:38 +02:00