Saxonberg Server API
    Preparing search index...

    Public shape added by ExitableMixin.

    zone is NOT declared here — it lives on Stuff base universally. Exitable just reads this.zone when deriving cartesian exits.

    Movement messaging now lives on MobileMixin (the mover composes the Scene). Exitable provides OPTIONAL hook methods that a specific location may implement to override the bodies; default impls are absent. See MobileMixin's MovementHookProvider for the shape.

    interface Exitable {
        addBidirectionalExit(
            other: Stuff & Container & Exitable,
            direction: string,
            opts?: BidirectionalExitOptions,
        ): Promise<void>;
        addExit(exit: default): Promise<boolean>;
        applyExits(map: Record<string, ExitInstruction>): Promise<void>;
        canEnter?(mover: Stuff & Mobile & Containable, via: default): VetoResult;
        canExit?(mover: Stuff & Mobile & Containable, via: default): VetoResult;
        getArrivalMessage?(mover: Stuff, exit: default): MovementBodies;
        getDepartureMessage?(mover: Stuff, exit: default): MovementBodies;
        getExit(direction: string): default | undefined;
        getExitDoors(): default[];
        getExits(): ReadonlyMap<string, default>;
        getObviousExits(): default[];
        hasExit(direction: string): boolean;
        hasPendingVerification(): boolean;
        onEntered?(mover: Stuff & Mobile & Containable, via: default): void;
        onExited?(mover: Stuff & Mobile & Containable, via: default): void;
        removeExit(direction: string): boolean;
        verifyOutboundExits(): void;
    }
    Index

    Methods

    • Install an explicit exit. Async because subclasses (notably CartesianLocation) may perform an async cardinal-zone check via ZoneApi.resolveZoneForPath before accepting the exit. The base implementation does only sync work; the async return type lets overrides remain typesafe.

      Parameters

      Returns Promise<boolean>

    • Declarative-content applier. Iterates the YAML-shape exits map and installs each entry, lazily cloning destination Locations (and doors) via StuffApi.singleton. Per-direction idempotency: matching existing exit → no-op; mismatching exit → throws with a diagnostic naming both seed paths. Per declarative-content-slate § exits on ExitableMixin.

      Parameters

      Returns Promise<void>

      Invoked by the Hydrator's Phase-2 instruction dispatch from a template's exits field. Instruction applier — consumes a declaration to produce derived runtime state; no paired getter (not a property). Per-direction idempotent across re-clone.

    • True iff this Exitable has at least one outbound exit awaiting mutual-exit verification — the inverse pointer hasn't been wired because the destination wasn't loaded the last time the verifier ran. Movement consults this on the hot path to skip verifyOutboundExits() entirely once every exit has settled.

      Each authored exit is tracked individually; settled exits (wired, oneWay, blocked, non-cardinal, no resolvable destPath) are evicted from the pending set as the verifier observes them. The set is empty in the steady state.

      Returns boolean