Add deconstruction queue
This commit is contained in:
@@ -139,9 +139,14 @@ private:
|
||||
// Returns the new entity id, or nullopt if blocks are insufficient.
|
||||
std::optional<BuildingId> tryPlaceBuilding(BuildingType type, QPoint anchor, Rotation rotation);
|
||||
|
||||
// Demolishes the building with the given id and refunds building blocks.
|
||||
// Marks the building with the given id for demolition: a construction site is
|
||||
// removed instantly (full refund), a built building is queued for timed
|
||||
// deconstruction (REQ-BLD-DECON-QUEUE), refunded on completion.
|
||||
void demolish(BuildingId id);
|
||||
|
||||
// Takes a queued building back out of the deconstruction queue (REQ-BLD-DECON-QUEUE).
|
||||
void cancelDeconstruction(BuildingId id);
|
||||
|
||||
// Applies the player's chosen schematic from the pending choices.
|
||||
// choiceIndex must be in [0, pendingChoices.size()).
|
||||
// Clears the pending choices after application.
|
||||
|
||||
Reference in New Issue
Block a user