pub struct UtcEquipmentItem {
pub slot_id: i32,
pub resref: ResRef,
pub droppable: bool,
}Expand description
Typed UTC one entry of Equip_ItemList.
Fields§
§slot_id: i32Equipment slot, which is the element’s own struct id rather than a label. The engine reads it off the GFF element header, so it has to be carried somewhere and no field in the file repeats it.
resref: ResRefEquipped item resref (EquippedRes).
droppable: boolDrop flag (Dropable).
Implementations§
Source§impl UtcEquipmentItem
impl UtcEquipmentItem
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 UtcEquipmentItem
impl Clone for UtcEquipmentItem
Source§fn clone(&self) -> UtcEquipmentItem
fn clone(&self) -> UtcEquipmentItem
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 UtcEquipmentItem
impl Debug for UtcEquipmentItem
Source§impl Default for UtcEquipmentItem
impl Default for UtcEquipmentItem
Source§impl HasSchema for UtcEquipmentItem
impl HasSchema for UtcEquipmentItem
Source§impl PartialEq for UtcEquipmentItem
impl PartialEq for UtcEquipmentItem
Source§fn eq(&self, other: &UtcEquipmentItem) -> bool
fn eq(&self, other: &UtcEquipmentItem) -> bool
self and other values to be equal, and is used by ==.