pub struct GitPlaceableCommon {
pub appearance: u32,
pub object_id: Option<ObjectId>,
}Expand description
The part of a placeable entry that is what every placeable 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§
§appearance: u32Visual model override (Appearance).
Read on a sparse placement as well as a saved one: LoadDoor and
LoadPlaceable are the same field readers whichever path calls them,
so a template-referencing placement carrying its own Appearance has
that value read as an override on top of the blueprint’s. Read as a
DWORD and truncated to a byte, which for a door keys doortypes.2da’s
model columns. Defaults to 0 when absent.
Read by LoadPlaceable and truncated to a byte, and the absent value
is a literal applied at the read site. Vanilla leaves the label out
when it would be zero.
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.
Implementations§
Source§impl GitPlaceableCommon
impl GitPlaceableCommon
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 GitPlaceableCommon
impl Clone for GitPlaceableCommon
Source§fn clone(&self) -> GitPlaceableCommon
fn clone(&self) -> GitPlaceableCommon
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 GitPlaceableCommon
impl Debug for GitPlaceableCommon
Source§impl Default for GitPlaceableCommon
impl Default for GitPlaceableCommon
Source§impl HasSchema for GitPlaceableCommon
impl HasSchema for GitPlaceableCommon
Source§impl PartialEq for GitPlaceableCommon
impl PartialEq for GitPlaceableCommon
Source§fn eq(&self, other: &GitPlaceableCommon) -> bool
fn eq(&self, other: &GitPlaceableCommon) -> bool
self and other values to be equal, and is used by ==.