Add deconstruction queue
This commit is contained in:
@@ -28,6 +28,7 @@ enum class CommandKind
|
||||
{
|
||||
PlaceBuilding,
|
||||
Demolish,
|
||||
CancelDeconstruction,
|
||||
RotateInPlace,
|
||||
SetRecipe,
|
||||
SetShipLayout,
|
||||
@@ -72,12 +73,22 @@ struct PlaceBuildingCommand : Command
|
||||
std::vector<ItemType> splitterFilterB;
|
||||
};
|
||||
|
||||
// Marks a building for demolition: a construction site is removed instantly, a
|
||||
// built building is queued for deconstruction (REQ-BLD-DEMOLISH, REQ-BLD-DECON-QUEUE).
|
||||
struct DemolishCommand : Command
|
||||
{
|
||||
DemolishCommand() : Command(CommandKind::Demolish) {}
|
||||
std::optional<BuildingId> id;
|
||||
};
|
||||
|
||||
// Takes a building back out of the deconstruction queue (REQ-BLD-DEMOLISH-CLICK,
|
||||
// REQ-BLD-DEMOLISH-BOX). No-op if the id is not currently queued.
|
||||
struct CancelDeconstructionCommand : Command
|
||||
{
|
||||
CancelDeconstructionCommand() : Command(CommandKind::CancelDeconstruction) {}
|
||||
std::optional<BuildingId> id;
|
||||
};
|
||||
|
||||
struct RotateInPlaceCommand : Command
|
||||
{
|
||||
RotateInPlaceCommand() : Command(CommandKind::RotateInPlace) {}
|
||||
|
||||
Reference in New Issue
Block a user