pub struct AreMiniGameVehicleScripts {
pub object: AreMiniGameObjectScripts,
pub on_damage: ResRef,
pub on_death: ResRef,
pub on_fire: ResRef,
pub on_hit_obstacle: ResRef,
pub on_track_loop: ResRef,
}Expand description
The Scripts struct on a vehicle, which is the object set plus five more.
CSWTrackFollower::LoadScripts overrides the base and reads the extra five
on top of it. Obstacles never carry them, and the corpus agrees: an
obstacle’s Scripts holds exactly the base set.
Fields§
§object: AreMiniGameObjectScriptsThe slots shared with obstacles.
on_damage: ResRefFired when the vehicle takes damage (OnDamage).
on_death: ResRefFired when the vehicle is destroyed (OnDeath).
on_fire: ResRefFired when the vehicle fires a gun bank (OnFire).
on_hit_obstacle: ResRefFired when the vehicle hits an obstacle (OnHitObstacle).
on_track_loop: ResRefFired each time the vehicle completes a track loop (OnTrackLoop).
Implementations§
Source§impl AreMiniGameVehicleScripts
impl AreMiniGameVehicleScripts
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 AreMiniGameVehicleScripts
impl Clone for AreMiniGameVehicleScripts
Source§fn clone(&self) -> AreMiniGameVehicleScripts
fn clone(&self) -> AreMiniGameVehicleScripts
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 AreMiniGameVehicleScripts
impl Debug for AreMiniGameVehicleScripts
Source§impl Default for AreMiniGameVehicleScripts
impl Default for AreMiniGameVehicleScripts
Source§impl PartialEq for AreMiniGameVehicleScripts
impl PartialEq for AreMiniGameVehicleScripts
Source§fn eq(&self, other: &AreMiniGameVehicleScripts) -> bool
fn eq(&self, other: &AreMiniGameVehicleScripts) -> bool
self and other values to be equal, and is used by ==.