Implement the deconstruction queue

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
This commit is contained in:
2026-07-22 12:59:27 +02:00
parent aec65446d5
commit 1914705ab9
16 changed files with 545 additions and 80 deletions

View File

@@ -211,6 +211,7 @@ TEST_CASE("Missing field in world.toml is rejected with the field path", "[confi
[world]
height_tiles = 60
refund_percentage = 75
deconstruction_time_seconds = 0.1
scrap_despawn_seconds = 30
scrap_per_threat = 0.01
tile_size_m = 10
@@ -262,6 +263,7 @@ TEST_CASE("Malformed formula in world.toml is rejected with field identification
[world]
height_tiles = 60
refund_percentage = 75
deconstruction_time_seconds = 0.1
scrap_despawn_seconds = 30
scrap_per_threat = 0.01
tile_size_m = 10
@@ -314,6 +316,7 @@ TEST_CASE("Inverted wave gap range is rejected", "[config]")
[world]
height_tiles = 60
refund_percentage = 75
deconstruction_time_seconds = 0.1
scrap_despawn_seconds = 30
scrap_per_threat = 0.01
tile_size_m = 10