Saxonberg Server API
    Preparing search index...

    Class BulkableApi

    Index

    Constructors

    Methods

    • A one-line room-view summary of any puddle pooling on location's floor — e.g. "A puddle of clear water pools on the floor." Returns null when the location has no floor or the floor's surface slot is empty. Consumed by LookController so a spill surfaces in the bare look (the floor's own look floor description carries the puddle too, via the Bulkable markup augmenter).

      Parameters

      Returns string | null

    • Find the surface-bulk slot of the floor in near's location — the drain target for the spill verb and the open-vessel drain-through cascade. Returns null when the location has no floor (the defensive no-floor case).

      Parameters

      Returns BulkSlot | null

    • Hand consumed matter to an actor's ingest seam (a Creature method; v1 no-op). Used by drink / sip. Duck-typed so a non-Creature giver can't crash the verb; null material is a no-op. The bridge lives in the Api layer so both verbs route through one place.

      Parameters

      Returns void

    • Solid analog of ingest — the eat bridge. Routes the consumed solid through the same Creature.ingest seam with the 'solid' phase so it fills the digestion buffer's solid sub-volume. Returns the litres the body actually accepted (the digestion-buffer cap may refuse the excess of an over-full stomach), so eat can hold to the partial-transfer contract; a non-Creature giver or null material accepts nothing.

      Parameters

      Returns number

    • Resolve a holder's bulk slot handle for a verb. affordance comes from model.field.via?.bulk?.affordance (set by the :b transform or material-keyword resolution); when absent, the holder's single present slot is used. Returns null when the holder isn't Bulkable or the slot can't be resolved (ambiguous / missing) — the controller renders the player-facing decline.

      Parameters

      Returns BulkSlot | null

    • Move matter from one bulk slot to another (or to a discard sink, to === null, for drink).

      Pipeline:

      1. Empty / unresolved source → empty-result, declined.
      2. Material compatibility on to — a non-empty destination must hold the same material → target-declined { material-mismatch }.
      3. Closure on an interior to — if its closure can't retain the matter, drain through to the floor's surface puddle (one level of redirection, not recursive).
      4. Clamp applied = min(requested, from.available(), to.remaining()); strict shortfall rejects, lenient clamps.
      5. Apply: debit the source (skipped for an unbounded source), credit the destination (adopting the material when it was empty); a null sink just discards.

      Parameters

      Returns TransferResult