pub struct ActionStack {
pub outbox: Vec<Message>,
/* private fields */
}Expand description
The CharacterComponent’s task stack (top index) and its “on empty” chain.
Fields§
§outbox: Vec<Message>Job-manager messages from aborted CompleteTasks, for the owner to deliver right after the clear.
Original: FUN_1400caf90.
Implementations§
Source§impl ActionStack
impl ActionStack
Sourcepub fn restored(
entries: Vec<(Action, bool)>,
on_empty: Option<Action>,
) -> ActionStack
pub fn restored( entries: Vec<(Action, bool)>, on_empty: Option<Action>, ) -> ActionStack
A saved stack: its entries bottom to top, each one action and whether it started, and the “on empty” action. Actions linked to an entry are not saved.
Original: FUN_14010ef80.
Sourcepub fn saved(&self) -> (Vec<(&Action, bool)>, Option<&Action>)
pub fn saved(&self) -> (Vec<(&Action, bool)>, Option<&Action>)
What a save holds: each entry’s first action with its started flag, and the “on empty” chain’s first action.
Original: FUN_14010ef80.
Sourcepub fn clear(
&mut self,
ch: &mut Character,
group: &AnimationGroup,
storages: &mut [Storage],
)
pub fn clear( &mut self, ch: &mut Character, group: &AnimationGroup, storages: &mut [Storage], )
Abort every chain (slot on all actions) and drop the “on empty” chain.
Original: FUN_1400ca8d0.
Sourcepub fn pending_reservations(&self) -> Vec<(usize, usize, i32)>
pub fn pending_reservations(&self) -> Vec<(usize, usize, i32)>
The stored goods queued actions hold reserved: (storage, material, count) of each
unstarted PickupStoredRawMaterial and reserving ConsumeStoredRawMaterial.
Sourcepub fn holds_task(&self, work: i32) -> Option<i32>
pub fn holds_task(&self, work: i32) -> Option<i32>
Does a chain start with this work’s CompleteTask?
Original: FUN_1400fc5d0.
Sourcepub fn attach(&mut self, action: Action)
pub fn attach(&mut self, action: Action)
Link action into the top chain (the original’s of the top action).
Sourcepub fn hunt_watch(&mut self) -> Option<(usize, &mut bool)>
pub fn hunt_watch(&mut self) -> Option<(usize, &mut bool)>
The top chain’s HuntAnimal, if any: its lodge and its done flag.
Sourcepub fn notify_moves(&mut self, following: bool)
pub fn notify_moves(&mut self, following: bool)
The scheduled notify: the running chain’s started actions get slot; MoveTo’s sets whether it follows.
Original: FUN_14010e950, FUN_1400ca450, FUN_1400cde40.
Sourcepub fn set_on_empty(&mut self, actions: Vec<Action>)
pub fn set_on_empty(&mut self, actions: Vec<Action>)
Set the actions to run when the stack is empty.
Trait Implementations§
Source§impl Clone for ActionStack
impl Clone for ActionStack
Source§fn clone(&self) -> ActionStack
fn clone(&self) -> ActionStack
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more