pub enum Action {
Show 17 variants
MoveTo(Box<MoveTo>),
PlayAnimation {
anim: usize,
duration: i64,
elapsed: i64,
},
PerformWork {
facing: f32,
anim: usize,
duration: i64,
elapsed: i64,
consume: bool,
},
SendMessage(Message),
CompleteRoad {
cell: i32,
ty: u8,
built: u8,
},
ConsumeStoredRawMaterial {
storage: usize,
items: Vec<(usize, i32)>,
reserved: bool,
},
PickupStoredRawMaterial {
storage: usize,
items: Vec<(usize, i32)>,
partial: bool,
},
ShowTool(i32),
CompleteTask {
work: i32,
param: i32,
},
AnimateResource {
entity: usize,
anim: usize,
wait: bool,
},
RemoveResource {
entity: usize,
flag: bool,
},
PickupPile {
entity: usize,
},
CreateRawMaterial {
template: usize,
cell: i32,
batch: i32,
workplace: Option<usize>,
factor: f32,
},
HuntAnimal {
lodge: usize,
done: bool,
},
RemoveAnimal {
entity: usize,
},
CreateNaturalResource {
template: usize,
occupant: Option<usize>,
cell: i32,
},
DropOff {
storage: usize,
material: usize,
count: i32,
redirect: bool,
},
}Expand description
One task.
Variants§
MoveTo(Box<MoveTo>)
MoveTo: walk to a target.
PlayAnimation
PlayAnimation: play anim for duration.
Fields
PerformWork
PerformWork: face facing (if within ±180), play anim for duration.
Fields
SendMessage(Message)
SendComponentMessage: deliver a message on start.
CompleteRoad
CompleteRoad: the cell becomes its road (or ground) on start.
Original: FUN_1400caea0.
ConsumeStoredRawMaterial
Reserve at construction; consume on start.
Original: FUN_1400cb880, FUN_1400cb980.
Fields
PickupStoredRawMaterial
Reserve at construction; transfer on start.
Original: FUN_1400cf9f0, FUN_1400cf700.
Fields
ShowTool(i32)
ShowTool: attach tool mesh n (0..10), the carried goods (−2), or nothing (−1). The town
draws it on the citizen’s tool node (StartingTown::model_instances).
Original: FUN_140043070, FUN_14011c880.
CompleteTask
CompleteTask: tell the job manager the task is done or abandoned.
Original: FUN_1400cb270, FUN_1400cb010; abandoned FUN_1400caf90.
AnimateResource
AnimateNaturalResource: play the resource’s animation anim; with wait, run until it
ends.
Original: FUN_1400caca0, FUN_1400caad0, FUN_1400caa80.
Fields
RemoveResource
RemoveNaturalResource: remove the resource and leave its pile; abort releases the claim
(flag 0x100000).
Original: FUN_1400d02c0, FUN_1400cffe0, FUN_1400cff70.
PickupPile
PickupRawMaterial: take the whole pile into the carried storage and destroy it.
Original: FUN_1400cf040, FUN_1400ceda0.
CreateRawMaterial
CreateRawMaterial: leave the output as piles near cell, batch weight each (the
worker’s capacity).
Original: FUN_1400cc670, FUN_1400cc010.
Fields
HuntAnimal
HuntAnimal, attached to a hunter’s walk or wait: running until its notify (run by the
citizens’ update) has started an attack.
Original: FUN_1400cd8d0, FUN_1400cd2b0.
RemoveAnimal
RemoveAnimal.
Original: FUN_1400cfcc0.
CreateNaturalResource
CreateNaturalResource: plant template on cell, which must hold no object and
occupant as its occupant.
Original: FUN_1400cbef0.
Fields
DropOff
DropOffRawMaterial: move up to count carried units into storage; with redirect a
storage that cannot take them sends the citizen on to another, or the goods are left on the
ground.
Original: FUN_1400cd1a0, FUN_1400cc7d0.