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
This commit is contained in:
2026-08-06 16:21:53 +02:00
parent 51c6a4a567
commit 648241ba2a
12 changed files with 26 additions and 231 deletions

View File

@@ -16,10 +16,10 @@
#include "SimulationTestAccess.h"
#include "TestConfig.h"
// readBuildingConfig underpins the copy-settings gesture (REQ-BLD-COPY-CONFIG):
// it extracts a building's recipe / schematic / layout / splitter filters so they
// can be stamped onto a same-type building. It reads operational buildings and
// construction sites alike.
// readBuildingConfig underpins blueprint capture (REQ-UI-BLUEPRINT-STORAGE): it
// extracts a building's recipe / schematic / layout / splitter filters so they can be
// stored in the blueprint and reapplied on placement. It reads operational buildings
// and construction sites alike.
namespace
{
@@ -60,7 +60,7 @@ const ShipDef* findAvailableSchematic(const GameConfig& cfg)
}
} // namespace
TEST_CASE("readBuildingConfig returns a miner's selected recipe", "[copyconfig]")
TEST_CASE("readBuildingConfig returns a miner's selected recipe", "[blueprint]")
{
const GameConfig cfg = loadTestConfig();
Simulation sim(loadTestConfig(), 7);
@@ -78,7 +78,7 @@ TEST_CASE("readBuildingConfig returns a miner's selected recipe", "[copyconfig]"
}
TEST_CASE("readBuildingConfig leaves recipe unset when nothing is selected",
"[copyconfig]")
"[blueprint]")
{
const GameConfig cfg = loadTestConfig();
Simulation sim(loadTestConfig(), 7);
@@ -93,7 +93,7 @@ TEST_CASE("readBuildingConfig leaves recipe unset when nothing is selected",
}
TEST_CASE("readBuildingConfig returns a shipyard's schematic and layout",
"[copyconfig]")
"[blueprint]")
{
const GameConfig cfg = loadTestConfig();
Simulation sim(loadTestConfig(), 7);
@@ -113,7 +113,7 @@ TEST_CASE("readBuildingConfig returns a shipyard's schematic and layout",
CHECK(config->shipLayout.has_value());
}
TEST_CASE("readBuildingConfig reads a queued construction site", "[copyconfig]")
TEST_CASE("readBuildingConfig reads a queued construction site", "[blueprint]")
{
const GameConfig cfg = loadTestConfig();
Simulation sim(loadTestConfig(), 7);
@@ -134,7 +134,7 @@ TEST_CASE("readBuildingConfig reads a queued construction site", "[copyconfig]")
CHECK(*config->recipeId == "mine_iron_ore");
}
TEST_CASE("readBuildingConfig returns nullopt for an unknown id", "[copyconfig]")
TEST_CASE("readBuildingConfig returns nullopt for an unknown id", "[blueprint]")
{
Simulation sim(loadTestConfig(), 7);
CHECK_FALSE(readBuildingConfig(sim, kInvalidBuildingId).has_value());