Implements REQ-UI-ITEM-ICON and REQ-UI-RECIPE-ICON. Adds an optional
recipes.toml `icon` field (an item id; defaults to the recipe's first
output). New ItemIconCache loads per-item SVGs from icons/items and
caches pixmaps per target pixel size, shared by:
- the Miner/Assembler recipe-selection dialog, which now shows icon-only
option buttons (name-caption fallback when no icon file exists), and
- GameWorldView belt/port item rendering via a shared drawWorldItem
helper (colored-square fallback preserved).
Shipyard schematic dialog is unchanged. No icon art is shipped; every
path falls back cleanly when an item has no SVG.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
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
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
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
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
Add deterministic record/playback for a run.
Recording captures `(seed, config hash, ordered tick-tagged commands)` and re-simulates on playback — no state snapshots. `DotaFactory.exe --replay <file>` re-plays a recorded run view-only with manual speed/pause.
Reviewed-on: #4
Co-authored-by: Malte Langkabel <malte.langkabel@gmail.com>
Co-committed-by: Malte Langkabel <malte.langkabel@gmail.com>