Commit Graph

16 Commits

Author SHA1 Message Date
3cf35b669e implement blueprint compatible overlap and configuration transfer
Implements the two rules specified in 128bf81, which restore the
copy-settings capability removed in 648241b as a property of blueprint
placement: press C on one configured building, then click same-type
buildings to stamp its settings across the factory.

The ghost colour and the click path already shared one predicate,
canPlaceBuilding, which is what kept preview and outcome from disagreeing.
The new rules make that answer four-valued, so the shared predicate becomes
a shared classifier: resolveBlueprintGhost in PlacementRules returns
PlaceNew / CompatibleOverlap / Transfer / Invalid, and both callers switch
on it. Putting it in lib rather than in the view is the whole testability
story -- src/ui is off the test include path.

findRotateInPlaceTarget is now the tunnel guard plus a shared
findCoincidingSameTypeBuilding core, so the two rules cannot drift apart;
its existing tests pass untouched. Blueprint placement no longer emits
RotateInPlaceCommand at all. Builder mode and the belt drag are unchanged.

transferConfigTo sends every field unconditionally, so a field the
blueprint stores nothing for clears the target's rather than leaving it.
The simulation's unchanged-value guards absorb the no-op case, which is
what keeps clicking an already-matching building free of buffer and
production-progress loss.

drawBuildingGhost's bool valid becomes GhostTint{Normal,Invalid,Transfer};
the transfer colour is taken at full RGB like the invalid one so it does
not double-dim against the ghost opacity. visuals.toml regains the overlay
colour under the name config_transfer, with its VisualsConfig field and
loader line -- overlay keys are mandatory, so the three move together.

The six new resolveBlueprintGhost cases failed on first run because the
test buildings were anchored in space: BuildingSystem::place skips the
terrain rules, resolveBlueprintGhost applies them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JcReq7hVk4KUPhTDKWAG7K
2026-08-06 19:20:34 +02:00
648241ba2a remove the Shift copy-building-settings gesture
REQ-BLD-COPY-CONFIG is dropped: Shift+right-click no longer caches a
building's recipe / schematic+layout / splitter filters, Shift+left-click
no longer stamps them onto same-type buildings, and the cyan eligible-
target tint and copy/paste flashes go with them. Shift+left-click now
falls through to normal selection, which needs no code of its own -- only
Ctrl is meaningful to selection (REQ-UI-MULTI-SELECT), so dropping the
branch that consumed the click is enough.

readBuildingConfig stays. It had two callers, and the other one is
captureBlueprintFromSelection, which needs it to record each blueprint
building's configuration (REQ-UI-BLUEPRINT-STORAGE). Its five tests stay
too, retagged [blueprint] and rewritten to name the caller that is left.

The visuals.toml copy_config colour is removed together with its
VisualsConfig field and its loader line: overlay keys are mandatory, so
those three have to move as one or startup aborts.

REQ-BLD-COPY-CONFIG-FEEDBACK, cited by four of these files and by the TOML
comment, never existed in requirements.md; deleting the citations retires
a dangling id.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JcReq7hVk4KUPhTDKWAG7K
2026-08-06 16:21:53 +02:00
561c95d0dd make belt darker so that there is more contrast to the item icons 2026-07-23 21:30:48 +02:00
e20a0bba67 Rename Demolish to Deconstruct 2026-07-22 21:40:42 +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
4b149d97a7 dim the game behind dialogs and escape menu 2026-07-13 22:11:21 +02:00
3ce6e6d599 Tint not-yet-buildable asteroid area 2026-07-13 21:42:59 +02:00
5f6ecbf6c8 implement visual feedback for copy building settings with shift + click gesture 2026-07-09 21:33:24 +02:00
c6db4bf24a first full balancing round 2026-07-08 20:27:25 +02:00
9573b9789a change repair_tool application and add beams for salvager and repair_tool 2026-06-19 21:15:47 +02:00
997a7778e0 first iteration of fable 5 on ship and module grids and recipes 2026-06-14 14:23:53 +02:00
69b35d2bfc fix config 2026-06-10 22:37:46 +02:00
42b51cc6f4 remove unnecessary modules for first playtest 2026-06-04 21:27:29 +02:00
9d0a60a93b define ship roles via added modules and allow multiple weapons 2026-06-01 23:05:21 +02:00
7e0104e9b8 fix config data paths 2026-04-29 21:32:32 +02:00