Skip to main content

Level

Struct Level 

Source
pub struct Level {
Show 28 fields pub name: String, pub x: i32, pub y: i32, pub width: i32, pub height: i32, pub music_layer_1: bool, pub music_layer_2: bool, pub music_layer_3: bool, pub music_layer_4: bool, pub music_progress: String, pub whisper: bool, pub underwater: bool, pub c: i32, pub alt_music: String, pub space: bool, pub wind_pattern: String, pub disable_down_transition: bool, pub dark: bool, pub fgdecals: FGDecals, pub bgdecals: BGDecals, pub fgtiles: FGTiles, pub bgtiles: BGTiles, pub solids: Solids, pub bg: BGSolids, pub entities: Entities, pub triggers: Triggers, pub objtiles: Option<ObjTiles>, pub invalid: Vec<BinEl>,
}
Expand description

A room in a Map. Only confusingly named fields are documented.

Fields§

§name: String§x: i32§y: i32§width: i32§height: i32§music_layer_1: bool§music_layer_2: bool§music_layer_3: bool§music_layer_4: bool§music_progress: String§whisper: bool§underwater: bool§c: i32

Unclear what this does.

§alt_music: String

Unclear what this does, though I believe that it is the default music used by Music triggers.

§space: bool

Alternate gravity. Behavior may be unstable in different game versions.

§wind_pattern: String§disable_down_transition: bool§dark: bool

Affects lighting shaders.

§fgdecals: FGDecals§bgdecals: BGDecals§fgtiles: FGTiles§bgtiles: BGTiles§solids: Solids§bg: BGSolids§entities: Entities§triggers: Triggers§objtiles: Option<ObjTiles>

Optional, as some serializers (such as older versions of Maple) don’t include these.

§invalid: Vec<BinEl>

All children that failed to parse.

Trait Implementations§

Source§

impl BinElType for Level

Source§

fn from_binel(binel: BinElValue) -> Result<Self>

Deserialize self from a BinElValue.
Source§

fn into_binel(self) -> BinElValue

Serialize self into a BinElValue. Can never fail.
Source§

fn maybe_attr() -> bool

Whether the BinElType may serialize to a BinElValue::Attribute. Recommended.
Source§

fn elem_name() -> Option<&'static str>

If there is a single valid name when deserializing from an element, and you know it at compile-time, implement this. Recommended.
Source§

fn maybe_elem() -> bool

Whether the BinElType may serialize to a BinElValue::Element. Recommended.
Source§

impl Clone for Level

Source§

fn clone(&self) -> Level

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Level

Source§

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

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

impl Default for Level

Source§

fn default() -> Level

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

impl PartialEq for Level

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 Level

Auto Trait Implementations§

§

impl Freeze for Level

§

impl RefUnwindSafe for Level

§

impl Send for Level

§

impl Sync for Level

§

impl Unpin for Level

§

impl UnsafeUnpin for Level

§

impl UnwindSafe for Level

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> 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<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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.