Implement REQ-BLD-COPY-CONFIG: copy building settings with Shift

Shift+right-click a building copies its settings (miner/assembler recipe,
shipyard schematic + module layout, or splitter output filters) into a
temporary UI cache; Shift+left-click stamps them onto another building of
the same type. The gesture is active only in the default selection mode,
works on operational buildings and construction sites, and the cache
clears when Shift is released (or on Restart).

Paste reuses the existing configuration commands (SetRecipe, SetShipLayout,
SetSplitterFilters, SetSiteSplitterFilters), so it inherits their buffer-
clearing / mid-cycle-cancel semantics and replays for free — no new command
kinds or serializer changes.

Extract the recipe/schematic/layout/filter reader into a shared
readBuildingConfig() (lib/sim), handling buildings and sites alike, and
reuse it from BlueprintPanel to remove the duplicated capture logic.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VGNNLeFWhVzvxkK9qVXP2K
This commit is contained in:
2026-07-09 16:21:59 +02:00
parent c144078ea6
commit 92cfcee682
8 changed files with 352 additions and 13 deletions

View File

@@ -9,6 +9,7 @@ add_files(
BeltSystemTest.cpp
SurfaceMaskTest.cpp
BuildingTest.cpp
BuildingConfigTest.cpp
ShipTest.cpp
ScrapTest.cpp
BehaviorSystemTest.cpp