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:
@@ -129,5 +129,10 @@ struct Building
|
||||
|
||||
// Module layout for shipyards (REQ-MOD-LAYOUT).
|
||||
std::optional<ShipLayoutConfig> shipLayout;
|
||||
|
||||
// True while this building sits in the deconstruction queue (REQ-BLD-DECON-QUEUE).
|
||||
// A queued building stops operating immediately (all tick loops skip it) but keeps
|
||||
// occupying its tiles until its deconstruction completes.
|
||||
bool queuedForDeconstruction = false;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user