pub struct OriginSink<'a> { /* private fields */ }Expand description
Sink decorator that stamps the provenance of everything a producer emits, and refuses whatever it cannot stamp.
The fight primitives below always build CombatEventOrigin::Core and know
nothing about modifiers. A modifier runs its work against
OriginSink::proc(real_sink) instead, so everything it emits — directly or
through a nested primitive — comes out Proc without any call site
threading the marker.
Casts and runs are carried, not refused: push_attack / push_run write the
scope’s provenance into the queued cast, which reaches
essences::entity::ActionWithDeadline, so the damage it lands ticks later
still resolves under this scope’s mark.
The sink fails closed for events it cannot mark: a non-Core scope may only
emit events OverlordEvent::set_origin accepts. CastEffectFromEvent has
no field of its own to stamp and SpawnEntity would hand a producer a
combatant fighting with its own Core actions, so both are refused. A Core
scope is unrestricted — Core is what every emit site already builds.
Implementations§
Source§impl<'a> OriginSink<'a>
impl<'a> OriginSink<'a>
Trait Implementations§
Source§impl FightSink for OriginSink<'_>
impl FightSink for OriginSink<'_>
Source§fn claim_once(&mut self, slot: OnceSlot, armed: i64) -> i64
fn claim_once(&mut self, slot: OnceSlot, armed: i64) -> i64
Forwarded, not re-latched: the budget belongs to the dispatch, and a producer scope running inside one is part of that same dispatch.