/** * Missions driven from authored scene markers. A designer places a marker (or volume) in the editor * and sets one of the registered mission actions in the inspector — `mission_start`, * `mission_objective` or `mission_fail` — and the runtime starts, advances or fails the mission when * an actor trips it. Nothing about the marker is mission-specific code; it is the shared authored * trigger vocabulary, plus the marker positions a positional objective reads. */ import { type AuthoredTrigger, type TriggerActionDefinition, type TriggerDispatchEvent } from "../scene/authoredTriggers.js"; import type { SceneDocumentLike, ScenePoint3 } from "../world/sceneShapes.js"; import type { MissionRuntime } from "./mission.js"; /** * Marker positions from an authored scene, keyed by marker id — what a positional objective reads. * * @capability mission-triggers read authored scene marker positions for positional objectives */ export declare function missionMarkers(document: SceneDocumentLike): Record; /** * The mission actions a game registers so the editor inspector can assign them to a marker or volume. * Params land flat on the object's `meta` beside `on`/`action`, like any authored trigger. * * @capability mission-triggers start, advance and fail a mission from authored scene markers */ export declare const MISSION_TRIGGER_ACTIONS: readonly TriggerActionDefinition[]; /** * Register {@link MISSION_TRIGGER_ACTIONS} so the editor lists them. Idempotent; call at module load * next to the game's catalogs. * * @capability mission-triggers start, advance and fail a mission from authored scene markers */ export declare function registerMissionTriggerActions(): void; /** Watches a document's authored mission triggers against moving actors. */ export interface MissionTriggerBridge { /** Advance one tick; fires the mission actions the actors tripped. */ step(input: { actors: readonly { id: string; position: readonly [number, number, number] | { x: number; y: number; z: number; }; }[]; interact?: readonly string[]; }): readonly TriggerDispatchEvent[]; /** The mission triggers this bridge was built from. */ triggers(): readonly AuthoredTrigger[]; /** Drop membership so the next step re-fires enters for still-inside actors. */ reset(): void; } /** * Wire authored markers to a {@link MissionRuntime}: an actor entering a `mission_start` marker starts * the named mission, `mission_objective` completes the named objective, and `mission_fail` lands the * named fail state. Pure membership math over the document, exactly like any other authored trigger. * * @capability mission-triggers start, advance and fail a mission from authored scene markers */ export declare function createMissionTriggerBridge(options: { runtime: MissionRuntime; document: SceneDocumentLike; triggers?: readonly AuthoredTrigger[]; }): MissionTriggerBridge;