pub struct Grants {
pub by_node: BTreeMap<String, BTreeSet<Grant>>,
pub by_quest: BTreeMap<String, (BTreeSet<String>, BTreeSet<Grant>)>,
}Expand description
What each place hands a body, derived from the campaign’s own quest documents — the grant half of §3.2’s loop.
Fields§
§by_node: BTreeMap<String, BTreeSet<Grant>>node id -> what standing there eventually yields.
by_quest: BTreeMap<String, (BTreeSet<String>, BTreeSet<Grant>)>quest id -> (the nodes its beats sit in, what completing it yields).
Implementations§
Source§impl Grants
impl Grants
Sourcepub fn of(c: &Campaign, graph: &LayoutGraphContent) -> Grants
pub fn of(c: &Campaign, graph: &LayoutGraphContent) -> Grants
Derive the grants a graph’s beats[] imply, from the campaign’s quests
and dialogue.
A beat bound to an objective grants every flag the campaign sets when
that objective completes, plus — for a talk-to — every flag reachable
in the spoken-to NPC’s dialogue tree, because the conversation happens
where the speaker stands. Both walks reach nested bundles, so a
set-flag inside a sequence step or an on_respawn hook counts
exactly as a top-level one does.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Grants
impl RefUnwindSafe for Grants
impl Send for Grants
impl Sync for Grants
impl Unpin for Grants
impl UnsafeUnpin for Grants
impl UnwindSafe for Grants
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more