[][src]Struct sulis_state::ActorState

pub struct ActorState {
    pub actor: Rc<Actor>,
    pub stats: StatList,
    pub listeners: ChangeListenerList<ActorState>,
    // some fields omitted
}

Fields

actor: Rc<Actor>stats: StatListlisteners: ChangeListenerList<ActorState>

Implementations

impl ActorState[src]

pub fn load(
    save: ActorSaveState,
    base: Option<ActorBuilder>
) -> Result<ActorState, Error>
[src]

pub fn new(actor: Rc<Actor>) -> ActorState[src]

pub fn started_turn_with_no_ap_for_actions(&self) -> bool[src]

pub fn add_anim_image_layers(
    &mut self,
    images: &HashMap<ImageLayer, Rc<dyn Image>>
)
[src]

pub fn remove_anim_image_layers(
    &mut self,
    images: &HashMap<ImageLayer, Rc<dyn Image>>
)
[src]

pub fn p_stats(&self) -> &PStats[src]

pub fn is_inventory_locked(&self) -> bool[src]

pub fn set_inventory_locked(&mut self, locked: bool)[src]

pub fn is_threatened(&self) -> bool[src]

pub fn add_threatening(&mut self, index: usize)[src]

pub fn remove_threatening(&mut self, index: usize)[src]

pub fn add_threatener(&mut self, index: usize)[src]

pub fn remove_threatener(&mut self, index: usize)[src]

pub fn faction(&self) -> Faction[src]

pub fn set_faction(&mut self, faction: Faction)[src]

pub fn clone_p_stats(&self) -> PStats[src]

pub fn check_texture_cache_invalid(&mut self) -> bool[src]

pub fn current_class_stat(&self, id: &str) -> ExtInt[src]

pub fn current_uses_per_day(&self, ability_group: &str) -> ExtInt[src]

pub fn current_uses_per_encounter(&self, ability_group: &str) -> ExtInt[src]

pub fn ability_state(&mut self, id: &str) -> Option<&mut AbilityState>[src]

pub fn can_swap_weapons(&self) -> bool[src]

Returns true if the parent can swap weapons, false otherwise

pub fn can_use_quick(&self, slot: QuickSlot) -> bool[src]

Returns true if this actor can use the item in the specified quick slot now - which includes having sufficient AP, false otherwise

pub fn can_use_sometime(&self, item_state: &ItemState) -> bool[src]

Returns true if this actor can use the item at some point - not taking AP into consideration, false otherwise

pub fn can_use(&self, item_state: &ItemState) -> bool[src]

Returns true if the specified item can be used now - which includes having sufficient AP, false otherwise

pub fn can_toggle(&self, id: &str) -> DisabledReason[src]

Returns an enum with the reason the ability cannot be activted, or DisabledReason::Enabled if it can. For modes, if it can be activated or deactivated.

pub fn can_activate(&self, id: &str) -> bool[src]

pub fn deactivate_ability_state(&mut self, id: &str)[src]

pub fn activate_ability_state(&mut self, id: &str)[src]

pub fn current_active_modes(&self) -> Vec<&str>[src]

pub fn effects_iter(&self) -> impl Iterator<Item = &usize>[src]

pub fn replace_actor(&mut self, new_actor: Actor)[src]

pub fn draw(
    &self,
    renderer: &mut dyn GraphicsRenderer,
    offset: Offset,
    scale: Scale,
    millis: u32
)
[src]

pub fn draw_to_texture(
    &self,
    renderer: &mut dyn GraphicsRenderer,
    texture_id: &str,
    offset: Offset,
    scale: Scale
)
[src]

pub fn has_ap_to_attack(&self) -> bool[src]

pub fn has_ap_for_any_action(&self) -> bool[src]

#[must_use]pub fn set_quick(
    &mut self,
    item: ItemState,
    slot: QuickSlot
) -> Option<ItemState>
[src]

Sets the specified item as the item at the quick slot. Returns the item that was previously there, if it was present

#[must_use]pub fn clear_quick(&mut self, slot: QuickSlot) -> Option<ItemState>[src]

Clears any item at the specified quick slot. Returns the item if it is present

#[must_use]pub fn equip(
    &mut self,
    item: ItemState,
    preferred_slot: Option<Slot>
) -> Vec<ItemState>
[src]

Attempts to equip the specified item to this actor's inventory. Returns a list of free items that need to be placed somewhere. If the equip action was not possible, this will include the item that was passed in. Otherwise, it will include any items that were unequipped in order to equip the new item. This will frequently be an empty list

pub fn can_equip(&self, item: &ItemState) -> bool[src]

pub fn can_unequip(&self, _slot: Slot) -> bool[src]

#[must_use]pub fn unequip(&mut self, slot: Slot) -> Option<ItemState>[src]

pub fn inventory(&self) -> &Inventory[src]

pub fn is_dead(&self) -> bool[src]

pub fn check_death(
    parent: &Rc<RefCell<EntityState>>,
    target: &Rc<RefCell<EntityState>>
)
[src]

pub fn is_disabled(&self) -> bool[src]

pub fn set_disabled(&mut self, disabled: bool)[src]

pub fn has_level_up(&self) -> bool[src]

pub fn add_xp(&mut self, xp: u32)[src]

pub fn xp(&self) -> u32[src]

pub fn hp(&self) -> i32[src]

pub fn overflow_ap(&self) -> i32[src]

pub fn ap(&self) -> u32[src]

pub fn get_move_ap_cost(&self, squares: u32) -> u32[src]

pub fn set_overflow_ap(&mut self, ap: i32)[src]

pub fn change_overflow_ap(&mut self, ap: i32)[src]

pub fn elapse_time(
    &mut self,
    millis_elapsed: u32,
    all_effects: &[Option<Effect>]
)
[src]

pub fn add_effect(&mut self, index: usize, bonuses: BonusList)[src]

pub fn init_day(&mut self)[src]

pub fn end_encounter(&mut self)[src]

pub fn init_turn(&mut self)[src]

pub fn end_turn(&mut self)[src]

pub fn compute_stats(&mut self)[src]

Auto Trait Implementations

impl !RefUnwindSafe for ActorState

impl !Send for ActorState

impl !Sync for ActorState

impl Unpin for ActorState

impl !UnwindSafe for ActorState

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]