pub enum EffectRootOwner<'a> {
ObjectiveComplete {
quest: &'a Quest,
objective: &'a str,
},
QuestComplete {
quest: &'a Quest,
},
Trigger(&'a EnvTrigger),
TrapPayload(&'a Trap),
DialogueRespawn,
}Expand description
What a root hangs off, with the owning object attached.
This is what a consumer matches on when it needs to reason about when a
bundle fires (the completability model) or who gates it (a trigger’s or
trap’s requires_flags). Because the match is exhaustive at every such site,
a sixth root is a compile error everywhere the answer would have to change.
Variants§
ObjectiveComplete
A quest’s on_objective_complete[<objective>] — fires at that objective’s
critical_path step. Forced: completing the objective is the mainline.
Fields
QuestComplete
A quest’s on_complete — fires at the quest’s completion step. Forced.
Trigger(&'a EnvTrigger)
An environment triggers[].effects — proximity/interaction-fired, so it
has no step of its own. Carries the trigger, whose requires_flags gate
the whole bundle.
TrapPayload(&'a Trap)
A traps[].payload (spec-0022) — proximity/interaction-fired exactly like
a trigger, and optional: the party may never trip it. Carries the trap,
whose requires_flags gate the whole payload.
DialogueRespawn
A dialogue option’s set-checkpoint on_respawn bundle — re-run on death
while that checkpoint is active, so it is optional too (nobody is forced to
die). Carries no owning object: the npc, node and option are all named in
the site’s path, and no consumer needs to reach the tree itself.
Implementations§
Source§impl<'a> EffectRootOwner<'a>
impl<'a> EffectRootOwner<'a>
Trait Implementations§
Source§impl<'a> Clone for EffectRootOwner<'a>
impl<'a> Clone for EffectRootOwner<'a>
Source§fn clone(&self) -> EffectRootOwner<'a>
fn clone(&self) -> EffectRootOwner<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more