pub enum Command {
Show 18 variants
SetCount {
profession: usize,
count: i32,
},
AddWorker {
entity: usize,
},
RemoveWorker {
entity: usize,
},
ChangeMaxWorkers {
entity: usize,
delta: i32,
},
SetEnabled {
entity: usize,
enabled: bool,
},
SetCrop {
entity: usize,
crop: Option<usize>,
},
FieldAction {
entity: usize,
action: i32,
},
SetLimit {
entity: usize,
limit: i32,
},
Demolish {
entity: usize,
},
CancelDemolition {
entity: usize,
},
PlanRoad {
cell: i32,
kind: u8,
ty: u8,
material: Option<usize>,
},
ClearRoad {
cell: i32,
marker: usize,
},
StateMessage {
entity: usize,
message: i32,
},
Control {
entity: usize,
kind: u32,
index: i32,
},
SetRecipe {
entity: usize,
recipe: i32,
},
Upgrade {
entity: usize,
template: usize,
},
Exchange {
entity: usize,
sell: Vec<(usize, i32)>,
buy: Vec<(usize, i32)>,
},
Trade {
entity: usize,
setting: TradeSetting,
},
}Expand description
A player action on professions, applied by the simulation.
Variants§
SetCount
ProfessionUI spinner 300 + profession set to count.
Original: FUN_14007b890.
AddWorker
WorkPlaceUI 0x1450: one more worker of the workplace’s profession.
Original: FUN_1400918a0.
RemoveWorker
WorkPlaceUI 0x1451: one fewer.
Original: FUN_140096650.
ChangeMaxWorkers
WorkPlaceUI 0x1452/0x1453: most workers ± 1.
Original: FUN_14008cae0, FUN_140134fd0.
SetEnabled
The pause button of a building’s window (element 6000).
Original: FUN_1400b7370, FUN_1401350d0.
SetCrop
CropUI’s crop list: the field’s crop; choosing the first one switches farming on.
Original: FUN_1400b7df0.
FieldAction
The field’s buttons: 0 plant now, 1 harvest now, 2 farming on/off.
Original: FUN_140120190.
SetLimit
PastureUI’s slider: the most animals the pasture keeps.
Original: FUN_1400ba2f0.
Demolish
Demolish a building (the Remove Buildings tool, or the button in its window).
Original: FUN_140109b40, FUN_140123470.
CancelDemolition
DestroyUI 0x1771: the demolition is called off.
Original: FUN_1401238d0.
PlanRoad
RoadTool’s apply: plan a road on a cell.
Original: FUN_14010a200, FUN_1400a1e30.
Fields
ClearRoad
Remove Roads: take a planned road back; a built one gets a removal marker (marker, the
tool’s template).
Original: FUN_140108ab0, FUN_1400a1bd0.
StateMessage
A StateMachine message: DestroyComponent’s Remove Cancel (0 while torn down), DestroyUI
0x1772 (0: rebuild the rubble) and 0x1773 (1: clear it); ImmigrationUI 0x9858 (7: take
the nomads in) and 0x9859 (8: turn them away).
Original: FUN_140123940, FUN_1401239a0.
Control
ControlUI: the kind component’s control index.
Original: FUN_140060150.
SetRecipe
ConsumeProduceUI’s product: ConsumeProduceComponent.
Original: FUN_14005fc90.
Upgrade
Upgrade a building to template (the upgrade button): it is demolished, and the new
building takes its place.
Original: FUN_14008c160, then FUN_140123470.
Exchange
TradeUI’s trade button: sell (material, count) and buy (trade good, count).
Original: FUN_1400868f0.
Fields
Trade
TradeUI’s settings on the TradeComponent.