pub struct Utw {Show 17 fields
pub template_resref: ResRef,
pub tag: String,
pub name: GffLocalizedString,
pub appearance_id: u8,
pub has_map_note: bool,
pub map_note_enabled: bool,
pub map_note: GffLocalizedString,
pub palette_id: u8,
pub comment: String,
pub linked_to: String,
pub description: GffLocalizedString,
pub x_position: f32,
pub y_position: f32,
pub z_position: f32,
pub x_orientation: f32,
pub y_orientation: f32,
pub z_orientation: f32,
}Expand description
Typed UTW model built from/to Gff data.
Fields§
§template_resref: ResRefWaypoint template resref (TemplateResRef).
tag: StringWaypoint tag (Tag).
name: GffLocalizedStringLocalized waypoint name (LocalizedName).
appearance_id: u8Waypoint appearance id (Appearance). Never read by the K1 engine.
has_map_note: boolHas-map-note flag (HasMapNote).
map_note_enabled: boolMap-note-enabled flag (MapNoteEnabled). Engine ignores this if has_map_note is false.
map_note: GffLocalizedStringLocalized map note (MapNote). Engine ignores this if has_map_note is false.
palette_id: u8Palette id (PaletteID).
comment: StringToolset comment (Comment).
linked_to: StringDeprecated linked target (LinkedTo).
description: GffLocalizedStringDeprecated localized description (Description).
x_position: f32World X position (XPosition).
y_position: f32World Y position (YPosition).
z_position: f32World Z position (ZPosition).
x_orientation: f32Facing X component (XOrientation).
The engine normalizes the orientation vector at runtime if its
magnitude is not 1.0. The write is hand-written because the condition
is the whole vector rather than any one component. It is in to_gff.
y_orientation: f32Facing Y component (YOrientation).
Written with the rest of the vector. See Utw::x_orientation.
z_orientation: f32Facing Z component (ZOrientation).
Written with the rest of the vector. See Utw::x_orientation.
Implementations§
Source§impl Utw
impl Utw
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.