pub struct Shortcut {
pub id: ShortcutId,
pub gate: AnchorId,
pub unlock: AnchorId,
pub on_unlock: Vec<QuestEffect>,
}Expand description
A stage-5 shortcut door (spec-0016 §2) — the souls loop-back.
The owner’s definition of the pattern: between two rest points there are two routes. The short one starts sealed and holds nothing; the long one is full of enemies and mechanisms. You earn the far side the hard way, pull one mechanism, and the short route opens forever. That moment is the design.
The compiler owns three obligations, none of them optional:
- the
unlockaffordance is reachable while the gate is still sealed — the long route genuinely exists (DW0373); - opening the gate genuinely shortens the trip across it — a shortcut that
pays nothing is a leak, not a shortcut (
DW0360); - permanence is structural: no
close-gatemay target a shortcut gate (DW0372). There is no re-sealing verb to reach for.
close-gate on a NON-shortcut gate (the point-of-no-return staging beat) is
untouched by this — the two verbs are deliberately disjoint.
Fields§
§id: ShortcutIdUnique shortcut id (shortcut/<kebab>).
gate: AnchorIdThe gate anchor this shortcut opens. Sealed from world-load (the prefab
carries the physical fill), and its metadata must declare the fill block
the compiler clears — the same requirement close-gate has.
unlock: AnchorIdThe FAR-side anchor whose interaction fires the permanent open. The
compiler summons the affordance there and polls it, reusing the v0.4
interaction-entity use primitive.
on_unlock: Vec<QuestEffect>Effects fired once, when the shortcut opens — the bar lifting, the elevator descending, the sound of a door you will never have to earn again. Emitted server-source-safe (the poll lives on the tick).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Shortcut
impl<'de> Deserialize<'de> for Shortcut
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Shortcut
impl JsonSchema for Shortcut
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more