pub struct GitTriggerCommon {
pub linked_to: String,
pub linked_to_flags: u8,
pub linked_to_module: ResRef,
pub object_id: Option<ObjectId>,
pub transition_destination: 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
The part of a trigger entry that is what every trigger entry carries, whichever form it takes.
Both arms flatten it and the list’s element is it, so the labels here are one declaration reached from both forms rather than two copies.
Fields§
§linked_to: StringLinked-to tag (LinkedTo). Waypoint tag in the target module.
linked_to_flags: u8Linked-to flags (LinkedToFlags).
linked_to_module: ResRefLinked module resref (LinkedToModule). Area transition target.
object_id: Option<ObjectId>Runtime object ID (ObjectId). Save-game only.
Runtime object id (ObjectId), which only a saved form carries.
The area-level dispatcher reads it once per element ahead of the static-versus-saved branch, so the engine reads it on both forms and the liveness below is right. What it does not do is author it: every element the engine saves carries one and no element the toolset shipped does. Held as the absence so writing a static placement back does not invent a runtime id for it.
transition_destination: GffLocalizedStringTransition destination text (TransitionDestin, truncated from
TransitionDestination by the 16-byte GFF label limit).
x_position: f32X position (XPosition).
y_position: f32Y position (YPosition).
z_position: f32Z position (ZPosition).
x_orientation: f32X orientation (XOrientation).
Every trigger in a retail install leaves the three orientation fields
at zero, which is why they went unnoticed while the other object types
got theirs. A trigger’s shape comes from its Geometry polygon, so
rotating one is not something vanilla content ever needed. That says
nothing about a mod that does.
y_orientation: f32Y orientation (YOrientation).
z_orientation: f32Z orientation (ZOrientation).
Implementations§
Source§impl GitTriggerCommon
impl GitTriggerCommon
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.
Trait Implementations§
Source§impl Clone for GitTriggerCommon
impl Clone for GitTriggerCommon
Source§fn clone(&self) -> GitTriggerCommon
fn clone(&self) -> GitTriggerCommon
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GitTriggerCommon
impl Debug for GitTriggerCommon
Source§impl Default for GitTriggerCommon
impl Default for GitTriggerCommon
Source§impl HasSchema for GitTriggerCommon
impl HasSchema for GitTriggerCommon
Source§impl PartialEq for GitTriggerCommon
impl PartialEq for GitTriggerCommon
Source§fn eq(&self, other: &GitTriggerCommon) -> bool
fn eq(&self, other: &GitTriggerCommon) -> bool
self and other values to be equal, and is used by ==.