Are

Struct Are 

Source
pub struct Are {
Show 81 fields pub unused_id: i32, pub creator_id: i32, pub version: u32, pub tag: String, pub name: GffLocalizedString, pub comment: String, pub alpha_test: f32, pub camera_style: i32, pub default_envmap: ResRef, pub restrict_mode: u8, pub grass_texture: ResRef, pub grass_density: f32, pub grass_size: f32, pub grass_prob_ll: f32, pub grass_prob_lr: f32, pub grass_prob_ul: f32, pub grass_prob_ur: f32, pub fog_enabled: bool, pub fog_near: f32, pub fog_far: f32, pub shadows: bool, pub shadow_opacity: u8, pub wind_power: i32, pub unescapable: bool, pub disable_transit: bool, pub stealth_xp: bool, pub stealth_xp_loss: u32, pub stealth_xp_max: u32, pub stealth_xp_current: u32, pub on_enter: ResRef, pub on_exit: ResRef, pub on_heartbeat: ResRef, pub on_user_defined: ResRef, pub flags: u32, pub loadscreen_id: u16, pub chance_rain: i32, pub chance_snow: i32, pub chance_lightning: i32, pub chance_fog: i32, pub mod_spot_check: i32, pub mod_listen_check: i32, pub moon_ambient_color: u32, pub moon_diffuse_color: u32, pub moon_fog_enabled: bool, pub moon_fog_near: f32, pub moon_fog_far: f32, pub moon_fog_color: u32, pub moon_shadows: bool, pub sun_ambient_color: u32, pub sun_diffuse_color: u32, pub dynamic_ambient_color: u32, pub sun_fog_color: u32, pub grass_ambient_color: u32, pub grass_diffuse_color: u32, pub grass_emissive_color: u32, pub dirty_argb_one: i32, pub dirty_size_one: i32, pub dirty_formula_one: i32, pub dirty_func_one: i32, pub dirty_argb_two: i32, pub dirty_size_two: i32, pub dirty_formula_two: i32, pub dirty_func_two: i32, pub dirty_argb_three: i32, pub dirty_size_three: i32, pub dirty_formula_three: i32, pub dirty_func_three: i32, pub is_night: bool, pub lighting_scheme: u8, pub day_night_cycle: u8, pub no_rest: bool, pub no_hang_back: bool, pub player_only: bool, pub player_vs_player: u8, pub trans_pending: u8, pub trans_pend_next_id: u8, pub trans_pend_curr_id: u8, pub map: AreMap, pub rooms: Vec<AreRoom>, pub expansion_list: Vec<AreExpansionEntry>, pub mini_game: Option<AreMiniGame>,
}
Expand description

Typed ARE model built from/to Gff data.

Fields§

§unused_id: i32

Legacy area id (ID).

§creator_id: i32

Legacy creator id (Creator_ID).

§version: u32

Area format version (Version).

§tag: String

Area tag (Tag).

§name: GffLocalizedString

Localized area name (Name).

§comment: String

Toolset/comment field (Comments).

§alpha_test: f32

Alpha test threshold (AlphaTest).

§camera_style: i32

Camera style ID (CameraStyle).

§default_envmap: ResRef

Default environment map resref (DefaultEnvMap).

§restrict_mode: u8

Restrict mode (RestrictMode) - triggers UnstealthParty on non-zero change.

§grass_texture: ResRef

Grass texture resref (Grass_TexName).

§grass_density: f32

Grass density (Grass_Density).

§grass_size: f32

Grass quad size (Grass_QuadSize).

§grass_prob_ll: f32

Grass probability lower-left (Grass_Prob_LL).

§grass_prob_lr: f32

Grass probability lower-right (Grass_Prob_LR).

§grass_prob_ul: f32

Grass probability upper-left (Grass_Prob_UL).

§grass_prob_ur: f32

Grass probability upper-right (Grass_Prob_UR).

§fog_enabled: bool

Sun fog enabled (SunFogOn).

§fog_near: f32

Sun fog near distance (SunFogNear).

§fog_far: f32

Sun fog far distance (SunFogFar).

§shadows: bool

Sun shadows enabled (SunShadows).

§shadow_opacity: u8

Shadow opacity (ShadowOpacity).

§wind_power: i32

Wind power (WindPower).

§unescapable: bool

Unescapable area flag (Unescapable).

§disable_transit: bool

Disable transit flag (DisableTransit).

§stealth_xp: bool

Stealth XP enabled (StealthXPEnabled).

§stealth_xp_loss: u32

Stealth XP loss (StealthXPLoss).

§stealth_xp_max: u32

Stealth XP max (StealthXPMax).

§stealth_xp_current: u32

Current stealth XP counter (StealthXPCurrent, save-state).

§on_enter: ResRef

Enter script resref (OnEnter).

§on_exit: ResRef

Exit script resref (OnExit).

§on_heartbeat: ResRef

Heartbeat script resref (OnHeartbeat).

§on_user_defined: ResRef

User-defined event script resref (OnUserDefined).

§flags: u32

Area flags (Flags).

§loadscreen_id: u16

Load screen ID (LoadScreenID).

§chance_rain: i32

Chance of rain (ChanceRain, K2).

§chance_snow: i32

Chance of snow (ChanceSnow, K2).

§chance_lightning: i32

Chance of lightning (ChanceLightning, K2).

§chance_fog: i32

Chance of fog (ChanceFog).

§mod_spot_check: i32

Mod spot-check modifier (ModSpotCheck).

§mod_listen_check: i32

Mod listen-check modifier (ModListenCheck).

§moon_ambient_color: u32

Moon ambient color (MoonAmbientColor).

§moon_diffuse_color: u32

Moon diffuse color (MoonDiffuseColor).

§moon_fog_enabled: bool

Moon fog enabled (MoonFogOn).

§moon_fog_near: f32

Moon fog near distance (MoonFogNear).

§moon_fog_far: f32

Moon fog far distance (MoonFogFar).

§moon_fog_color: u32

Moon fog color (MoonFogColor).

§moon_shadows: bool

Moon shadows enabled (MoonShadows).

§sun_ambient_color: u32

Sun ambient color (SunAmbientColor).

§sun_diffuse_color: u32

Sun diffuse color (SunDiffuseColor).

§dynamic_ambient_color: u32

Dynamic ambient color (DynAmbientColor).

§sun_fog_color: u32

Sun fog color (SunFogColor).

§grass_ambient_color: u32

Grass ambient color (Grass_Ambient).

§grass_diffuse_color: u32

Grass diffuse color (Grass_Diffuse).

§grass_emissive_color: u32

Grass emissive color (Grass_Emissive).

§dirty_argb_one: i32

Dirty overlay color one (DirtyARGBOne).

§dirty_size_one: i32

Dirty overlay size one (DirtySizeOne).

§dirty_formula_one: i32

Dirty overlay formula one (DirtyFormulaOne).

§dirty_func_one: i32

Dirty overlay func one (DirtyFuncOne).

§dirty_argb_two: i32

Dirty overlay color two (DirtyARGBTwo).

§dirty_size_two: i32

Dirty overlay size two (DirtySizeTwo).

§dirty_formula_two: i32

Dirty overlay formula two (DirtyFormulaTwo).

§dirty_func_two: i32

Dirty overlay func two (DirtyFuncTwo).

§dirty_argb_three: i32

Dirty overlay color three (DirtyARGBThree).

§dirty_size_three: i32

Dirty overlay size three (DirtySizeThree).

§dirty_formula_three: i32

Dirty overlay formula three (DirtyFormulaThre).

§dirty_func_three: i32

Dirty overlay func three (DirtyFuncThree).

§is_night: bool

Is-night flag (IsNight).

§lighting_scheme: u8

Lighting scheme (LightingScheme).

§day_night_cycle: u8

Day/night cycle flag (DayNightCycle).

§no_rest: bool

No-rest flag (NoRest).

§no_hang_back: bool

No-hang-back flag (NoHangBack).

§player_only: bool

Player-only flag (PlayerOnly).

§player_vs_player: u8

Player-vs-player mode (PlayerVsPlayer).

§trans_pending: u8

Transition pending flag (TransPending, save-state).

§trans_pend_next_id: u8

Transition pending next ID (TransPendNextID, save-state).

§trans_pend_curr_id: u8

Transition pending current ID (TransPendCurrID, save-state).

§map: AreMap

Embedded map metadata (Map struct).

§rooms: Vec<AreRoom>

Embedded room metadata (Rooms list).

§expansion_list: Vec<AreExpansionEntry>

Area expansion entries (Expansion_List list).

§mini_game: Option<AreMiniGame>

MiniGame struct (MiniGame).

Implementations§

Source§

impl Are

Source

pub fn new() -> Self

Creates an empty ARE value.

Source

pub fn from_gff(gff: &Gff) -> Result<Self, AreError>

Builds typed ARE data from a parsed GFF container.

Source

pub fn to_gff(&self) -> Gff

Converts this typed ARE value into a GFF container.

Trait Implementations§

Source§

impl Clone for Are

Source§

fn clone(&self) -> Are

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Are

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Are

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl GffSchema for Are

Source§

fn schema() -> &'static [FieldSchema]

Returns the root field schema for this GFF resource type.
Source§

impl PartialEq for Are

Source§

fn eq(&self, other: &Are) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Are

Auto Trait Implementations§

§

impl Freeze for Are

§

impl RefUnwindSafe for Are

§

impl Send for Are

§

impl Sync for Are

§

impl Unpin for Are

§

impl UnwindSafe for Are

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> StrictAs for T

Source§

fn strict_as<Dst>(self) -> Dst
where T: StrictCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> StrictCastFrom<Src> for Dst
where Src: StrictCast<Dst>,

Source§

fn strict_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.