pub struct SavingThrows {
pub fortitude: u8,
pub reflex: u8,
pub will: u8,
}Expand description
Saving throws shared by doors and placeables, blueprint and saved alike.
All three are recorded divergences on the absent axis, and all three are
the mechanism-only kind: a door constructs its saving throws and carries
them over where a placeable stamps a literal, and both land on zero. What
differs is how the default arises, not what it is, so the block needs no
per-consumer parameter. See LockState for the same reading applied to
a group where two of the pairs are weaker than that.
Fields§
§fortitude: u8Fortitude save (Fort).
reflex: u8Reflex save (Ref).
will: u8Will save (Will).
Implementations§
Source§impl SavingThrows
impl SavingThrows
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 SavingThrows
impl Clone for SavingThrows
Source§fn clone(&self) -> SavingThrows
fn clone(&self) -> SavingThrows
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 SavingThrows
impl Debug for SavingThrows
Source§impl Default for SavingThrows
impl Default for SavingThrows
Source§impl HasSchema for SavingThrows
impl HasSchema for SavingThrows
Source§impl PartialEq for SavingThrows
impl PartialEq for SavingThrows
Source§fn eq(&self, other: &SavingThrows) -> bool
fn eq(&self, other: &SavingThrows) -> bool
self and other values to be equal, and is used by ==.