[][src]Struct sulis_state::Effect

pub struct Effect {
    pub name: String,
    pub tag: String,
    pub ui_visible: bool,
    pub listeners: ChangeListenerList<Effect>,
    pub removal_listeners: ChangeListenerList<Effect>,
    // some fields omitted
}

Fields

name: Stringtag: Stringui_visible: boollisteners: ChangeListenerList<Effect>removal_listeners: ChangeListenerList<Effect>

Implementations

impl Effect[src]

pub fn load(
    data: EffectSaveState,
    new_index: usize,
    entities: &HashMap<usize, Rc<RefCell<EntityState>>>
) -> Result<Effect, Error>
[src]

pub fn new(
    name: &str,
    tag: &str,
    duration: ExtInt,
    bonuses: BonusList,
    deactivate_with_ability: Option<String>
) -> Effect
[src]

pub fn mark_for_removal(&mut self)[src]

pub fn set_surface_for_area(
    &mut self,
    area: &str,
    points: &[Point],
    squares_to_fire_on_moved: u32,
    aura: Option<usize>
)
[src]

pub fn icon(&self) -> Option<&Icon>[src]

pub fn set_icon(&mut self, icon: String, text: String)[src]

pub fn set_owning_entity(&mut self, entity: usize)[src]

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

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

pub fn surface(&self) -> Option<(&str, &Vec<Point>)>[src]

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

pub fn callbacks(&self) -> Vec<Rc<CallbackData>>[src]

pub fn add_callback(&mut self, cb: Rc<CallbackData>)[src]

#[must_use]pub fn update_on_moved_in_surface(&mut self) -> Vec<(Rc<CallbackData>, usize)>[src]

#[must_use]pub fn update(&mut self, millis_elapsed: u32) -> Vec<Rc<CallbackData>>[src]

Updates the effect time. returns true if a round has elapsed

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

pub fn name(&self) -> &str[src]

pub fn bonuses(&self) -> &BonusList[src]

pub fn duration_millis(&self) -> ExtInt[src]

pub fn total_duration_rounds(&self) -> ExtInt[src]

pub fn remaining_duration_rounds(&self) -> ExtInt[src]

Auto Trait Implementations

impl !RefUnwindSafe for Effect

impl !Send for Effect

impl !Sync for Effect

impl Unpin for Effect

impl !UnwindSafe for Effect

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]