[−][src]Struct sulis_state::area_state::AreaState
Fields
area: GeneratedArea
area_gen_seed: u128
on_load_fired: bool
Implementations
impl AreaState
[src]
pub fn new(area: Rc<Area>, seed: Option<u128>) -> Result<AreaState, Error>
[src]
pub fn load(id: &str, save: AreaSaveState) -> Result<AreaState, Error>
[src]
pub fn props(&self) -> &PropHandler
[src]
pub fn props_mut(&mut self) -> &mut PropHandler
[src]
pub fn pc_vis_full_redraw(&mut self)
[src]
pub fn take_pc_vis(&mut self) -> PCVisRedraw
[src]
pub fn get_merchant(&self, id: &str) -> Option<&MerchantState>
[src]
pub fn get_merchant_mut(&mut self, id: &str) -> Option<&mut MerchantState>
[src]
pub fn populate(&mut self)
[src]
Adds entities defined in the area definition to this area state
pub fn get_or_create_merchant(
&mut self,
id: &str,
loot_list: &Rc<LootList>,
buy_frac: f32,
sell_frac: f32,
refresh_time: Time
) -> &mut MerchantState
[src]
&mut self,
id: &str,
loot_list: &Rc<LootList>,
buy_frac: f32,
sell_frac: f32,
refresh_time: Time
) -> &mut MerchantState
pub fn update_music(&self, in_combat: bool, groups: Option<&[usize]>)
[src]
pub fn update_ambient_audio(&self, _time: &Time)
[src]
pub fn range_indicators(&mut self) -> &mut RangeIndicatorHandler
[src]
pub fn range_indicator(&self) -> Option<&RangeIndicator>
[src]
pub fn targeter(&self) -> Option<Rc<RefCell<AreaTargeter>>>
[src]
pub fn push_scroll_to_callback(&mut self, entity: Rc<RefCell<EntityState>>)
[src]
pub fn pop_scroll_to_callback(&mut self) -> Option<Rc<RefCell<EntityState>>>
[src]
pub fn fire_on_encounter_activated(
&mut self,
index: usize,
target: &Rc<RefCell<EntityState>>
)
[src]
&mut self,
index: usize,
target: &Rc<RefCell<EntityState>>
)
pub fn fire_on_encounter_cleared(
&mut self,
index: usize,
target: &Rc<RefCell<EntityState>>
)
[src]
&mut self,
index: usize,
target: &Rc<RefCell<EntityState>>
)
pub fn spawn_encounter_at(&mut self, x: i32, y: i32) -> bool
[src]
pub fn spawn_encounter(&mut self, enc_index: usize, respect_debug: bool)
[src]
pub fn is_terrain_passable(&self, size: &str, x: i32, y: i32) -> bool
[src]
pub fn is_passable_size(&self, size: &ObjectSize, x: i32, y: i32) -> bool
[src]
pub fn is_passable(
&self,
requester: &EntityState,
entities_to_ignore: &[usize],
new_x: i32,
new_y: i32
) -> bool
[src]
&self,
requester: &EntityState,
entities_to_ignore: &[usize],
new_x: i32,
new_y: i32
) -> bool
pub fn is_passable_for_entity(
&self,
requester: &EntityState,
x: i32,
y: i32
) -> bool
[src]
&self,
requester: &EntityState,
x: i32,
y: i32
) -> bool
pub fn get_entity_at(&self, x: i32, y: i32) -> Option<Rc<RefCell<EntityState>>>
[src]
pub fn get_transition_at(&self, x: i32, y: i32) -> Option<&Transition>
[src]
pub fn toggle_prop_active(&mut self, index: usize)
[src]
pub fn has_visibility(&self, parent: &EntityState, target: &EntityState) -> bool
[src]
pub fn compute_pc_visibility(
&mut self,
entity: &Rc<RefCell<EntityState>>,
delta_x: i32,
delta_y: i32
)
[src]
&mut self,
entity: &Rc<RefCell<EntityState>>,
delta_x: i32,
delta_y: i32
)
pub fn update_view_visibility(&mut self)
[src]
pub fn set_trigger_enabled_at(&mut self, x: i32, y: i32, enabled: bool) -> bool
[src]
pub fn is_pc_visible(&self, x: i32, y: i32) -> bool
[src]
whether the pc has current visibility to the specified coordinations
No bounds checking is done on the x
and y
arguments
pub fn is_pc_explored(&self, x: i32, y: i32) -> bool
[src]
whether the pc has current explored vis to the specified coordinates No bounds checking is done
pub fn move_entity(
&mut self,
entity: &Rc<RefCell<EntityState>>,
x: i32,
y: i32,
squares: u32
) -> bool
[src]
&mut self,
entity: &Rc<RefCell<EntityState>>,
x: i32,
y: i32,
squares: u32
) -> bool
#[must_use]pub fn remove_entity(
&mut self,
entity: &Rc<RefCell<EntityState>>,
mgr: &TurnManager
) -> HashSet<usize>
[src]
&mut self,
entity: &Rc<RefCell<EntityState>>,
mgr: &TurnManager
) -> HashSet<usize>
pub fn add_feedback_text(&mut self, text: AreaFeedbackText)
[src]
pub fn feedback_text_iter(&self) -> impl Iterator<Item = &AreaFeedbackText>
[src]
pub fn feedback_text_iter_mut(
&mut self
) -> impl Iterator<Item = &mut AreaFeedbackText>
[src]
&mut self
) -> impl Iterator<Item = &mut AreaFeedbackText>
pub fn entity_iter(&self) -> impl Iterator<Item = &usize>
[src]
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for AreaState
impl !Send for AreaState
impl !Sync for AreaState
impl Unpin for AreaState
impl !UnwindSafe for AreaState
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,