Saxonberg Server API
    Preparing search index...

    The NPC-side state machine. Registered (mandatory — SchedulerRegistry dispatches onAbort/getHost through the activity-class registry, so an unregistered class would silently skip cleanup).

    Implements

    Index

    Constructors

    Properties

    actor: Stuff & Engaged
    cancelable: true
    engagementId: string = ""
    interruptibleBy: ReadonlySet<keyof AbortReasonRegistry> = ...
    slots: ReadonlySet<EngagementSlot> = ...
    startedAt: number = 0
    type: "tree-dialogue-conversation" = DIALOGUE_CONVERSATION_TYPE

    Methods

    • Launch the detached choice-await loop. ScheduleApi.schedule wraps the callback in ExecutionContextApi.runRoot (domain code may not plant call frames directly), giving the loop a fresh root so its many awaits — and the continuations that resume when the player picks — outlive the originating command frame, which is gone by then.

      Returns void

    • The single teardown path — invoked by SchedulerRegistry on any cancel/terminate (graceful end, disconnect, host-destroyed, presence loss). Cancels the in-flight choice, releases the player-side hold, and stops the loop. All steps idempotent.

      Parameters

      • _reason: keyof AbortReasonRegistry

      Returns void

    • Resolve the guard-selected entry node (first entry whose guards all pass). Returns false when no entry is eligible (treated as "no usable tree" by the open seam). Sets the cursor on success.

      Returns Promise<boolean>