pub struct DlgLink {
pub active: ResRef,
pub index: u32,
pub display_inactive: bool,
}Expand description
A link between dialogue nodes (condition + target index).
Fields§
§active: ResRefCondition script (Active). Empty resref means always active.
index: u32Target node index (Index) in the corresponding node array. Exceeding bounds causes fatal engine load failure.
display_inactive: boolDisplay-inactive flag (DisplayInactive), declared on
DlgLinkDisplayInactive because only a RepliesList element carries
it. Only meaningful on
entry->reply links; defaults to false for reply->entry links.
Set, a reply whose Active condition fails is still shown to the
player as a disabled option; clear, it is dropped from the list. No
vanilla dialogue sets it, so shipped content always takes the drop
branch, but it gates behaviour rather than being inert, so it is a
capability a mod can reach for.
Implementations§
Source§impl DlgLink
impl DlgLink
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.