Items now emerge from a building's output port across a per-port virtual
output belt (progress 0.5 -> 1.0, occluded by the building) before
transferring onto the adjacent real belt, instead of appearing instantly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZR44tA8sn4dPqDzAVXyps
Belts, splitters, and tunnels accepted items regardless of which edge
they arrived through, so a tile would take an item pushed into its own
output edge (e.g. two facing belts ping-ponged an item forever).
Add oppositeRotation() and an entersThroughOutputEdge() predicate, and
guard every acceptance site (tryPutItem, tryPushToTile, and the belt
transfer in moveItemsToNextTile) so an item entering through an output
edge is refused (REQ-MAT-ACCEPT-DIR). Building output-port deposits now
also refuse a belt that faces back into the building.
Update requirements (new REQ-MAT-ACCEPT-DIR; REQ-MAT-OUTPUT-PORT and
REQ-BLD-TUNNEL-ENTRY clarified) and tests (explicit feed direction on
direct deposits; new output-edge rejection cases per tile type).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZR44tA8sn4dPqDzAVXyps
Add a window-wide semi-transparent black scrim drawn over the entire
game window (header bar, game world view, side panel column) while any
auto-pausing modal or end-game screen is open, behind that modal.
- New ModalDimOverlay widget: a full-window, mouse-transparent child of
MainWindow that paints the dim color. Visibility is reference-counted
(pushModal/popModal) so nested or back-to-back modals show a single
dim, not stacked layers; a ModalDimScope RAII guard drives it.
- Wire a guard around every modal opened from MainWindow: schematic
choice, escape menu, layout dialog, recipe/schematic selection
(spanning the auto-opened layout dialog), game-over, and win. The
nested Create Blueprint dialog is covered by the layout-dialog dim.
- Config-driven color via visuals.toml [overlays].modal_dim, following
the existing OverlayVisuals/parseColor pattern; refreshed on the
Restart config-reload paths (REQ-CFG-RELOAD).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZR44tA8sn4dPqDzAVXyps
Specify a transparent black scrim drawn over the entire game window
(header bar, game world view, side panel column) while any auto-pausing
modal is open — the escape menu, selection dialog, layout configuration
dialog, and schematic choice dialog — plus the game-over and win
screens. Nested modals show a single dim, not stacked layers. The
dim colour is config-driven via visuals.toml [overlays].
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZR44tA8sn4dPqDzAVXyps
Asteroid columns left of the buildable edge (x < -currentAsteroidWidth)
are reachable by the camera but not yet unlocked by expansion. Paint a
semi-transparent grey overlay over them so the locked area reads as
distinct from the buildable asteroid. The tint colour is config-driven
via overlays.locked_asteroid, matching the other overlay visuals.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZR44tA8sn4dPqDzAVXyps
m_scrollXTiles now stores the world-X (tiles) at the center of the
viewport instead of its left edge. A new viewLeftTiles() helper derives
the left edge for the world<->widget conversions and tile culling, so
the half-viewport math lives in one place.
The view now opens centered on the asteroid/space edge and pans left
until the buildable edge is centered and right until the enemy stations
are centered (revealing a little space beyond them).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZR44tA8sn4dPqDzAVXyps
Ring each selected scrap pile in the standard selection-outline color,
just outside its rendered circle, alongside the building outlines in
drawSelectionHighlights (REQ-UI-SCRAP-CLICK-SELECT).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZR44tA8sn4dPqDzAVXyps
Scrap piles become a third selection category: click to select (actors
win on overlap), box-drag / Ctrl+click multi-select, and the selected-
object panel shows the summed remaining amount, updating live and
dropping piles as they are collected or despawn.
- ScrapSystem: expose per-pile amount via ScrapInfo.
- EntityHitTest: add scrapAtWorldPos and scrapInBox (with tests).
- New header-only ScrapSelectionChangedEvent.
- GameWorldView: scrap selection member, click/box handling with the
building-wins disambiguation, and per-frame pruning of gone piles.
- SelectedBuildingPanel: scrap event, "Scrap: N" label, live total;
scrap and building/entity selections clear each other.
Implements REQ-UI-SCRAP-CLICK-SELECT, REQ-UI-SCRAP-MULTI-SELECT,
REQ-UI-SCRAP-PANEL.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZR44tA8sn4dPqDzAVXyps
Make scrap piles clickable as their own selection category, with
box-drag / Ctrl+click multi-select and a panel showing the total
remaining scrap amount. Add REQ-UI-SCRAP-CLICK-SELECT,
REQ-UI-SCRAP-MULTI-SELECT, REQ-UI-SCRAP-PANEL; update
REQ-UI-EMPTY-SELECTION, REQ-UI-MULTI-SELECT, and
REQ-UI-ENTITY-CLICK-SELECT accordingly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZR44tA8sn4dPqDzAVXyps
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
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
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
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
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
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
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
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
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
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
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
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