pub struct AreRoom {
pub part_sounds: Vec<ArePartSound>,
pub room_name: String,
pub env_audio: i32,
pub ambient_scale: f32,
}Expand description
Typed view over one ARE room entry in the Rooms list.
ForceRating and DisableWeather are declared and not modelled. Neither
field-name string exists anywhere in the executable, so no room load can
look either up, and a field the engine never reads at a path is not that
path’s to model. They stay on the schema so a reader meeting one is told it
is dead rather than told nothing, and so this writer stops putting them on
rooms that carry neither.
Fields§
§part_sounds: Vec<ArePartSound>Per-room part sound definitions (PartSounds list).
room_name: StringRoom name (RoomName).
env_audio: i32Environment audio ID (EnvAudio).
ambient_scale: f32Ambient scale (AmbientScale).
Implementations§
Source§impl AreRoom
impl AreRoom
Sourcepub const PARTS: &'static [&'static [Field]]
pub const PARTS: &'static [&'static [Field]]
This type’s schema in parts, which is what a container holding it references.
Own fields first, then one part per flattened child in the order they are declared.
Sourcepub fn read_declared(root: &GffStruct) -> Self
pub fn read_declared(root: &GffStruct) -> Self
Reads every declared field off root.
Absent fields take the entry’s own answer, so a fallback is derived from the declaration rather than restated beside it.
A field declaring a hand-written read is left at that answer for the view to overwrite.
Sourcepub fn write_declared(&self, root: &mut GffStruct)
pub fn write_declared(&self, root: &mut GffStruct)
Writes every declared field onto root, leaving out the ones
their entry says the engine’s own writer leaves out.
A field declaring a hand-written write is not touched here.
Sourcepub fn read_element(structure: &GffStruct) -> Self
pub fn read_element(structure: &GffStruct) -> Self
Reads one element of a list of this type.
Sourcepub fn write_element(&self, structure: &mut GffStruct)
pub fn write_element(&self, structure: &mut GffStruct)
Writes one element of a list of this type.