Saxonberg Server API
    Preparing search index...

    Class SlotApi

    Index

    Constructors

    Methods

    • Common-case inverse lookup: "what single host is this candidate slotted into?" Returns the single host or null. Throws if the candidate occupies slots on multiple hosts (a Wearable claiming two slots on ONE host is fine — same host counts once; cross-host occupancy is the violation).

      Parameters

      Returns Stuff & Slotted | null

    • Find every host-slot a candidate is currently occupying. O(N) over the global Stuff registry. Returns a Map keyed by host with arrays of slot names. Used by Slottable.onDestruct cleanup and the conveyance ripple's recursion.

      Parameters

      Returns ReadonlyMap<Stuff & Slotted, readonly string[]>

    • Multi-slot claim (transactional). Either every slot is claimed or none — no partial occupancy. Throws on validation failure identifying which slot blocked it. The thrown error rolls back any partial occupancies before propagating.

      Parameters

      Returns void

    • Atomic vacate-then-occupy with rollback. Used by every posture verb (sit/lie/kneel/stand-on/mount) to swap the actor's posture-bearing slot atomically.

      If from is null, just occupies to. If the occupy step fails, re-occupies from to restore prior state, then rethrows.

      Special case: when from and to reference the same (host, slot) pair, this is a no-op.

      Parameters

      Returns void

    • Walk the slot map on root and recurse into any Slotted occupant. Visitor fires once per unique occupant — even if the same occupant claims multiple slots on the same host (e.g. boots on foot:left + foot:right), it's visited once. Used by Mobile.traverse for the conveyance ripple, where double-moving the same Stuff is a bug. Visit order is depth-first.

      Cycle guard: an internal Set tracks visited hosts; a host already walked won't be re-recursed.

      Parameters

      Returns void