import { SceneActionContentType, SceneActionTypes } from "../../action/actionTypes"; import type { Scene, SceneDataRaw } from "../../elements/scene"; import { GameState, PlayerStateElementSnapshot } from "../../../player/gameState"; import { Awaitable } from "../../../../util/data"; import type { CalledActionResult } from "../../gameTypes"; import { ContentNode } from "../../action/tree/actionTree"; import { LogicAction } from "../../action/logicAction"; import { TypedAction } from "../../action/actions"; import { Story } from "../../elements/story"; import { ImageTransition } from "../../elements/transition/transitions/image/imageTransition"; import { ActionSearchOptions } from "../../types"; import { ExposedState, ExposedStateType } from "../../../player/type"; import type { TransformDefinitions } from "../../elements/transform/type"; import { ImageDataRaw } from "../../elements/displayable/image"; import { ActionExecutionInjection, ExecutedActionResult } from "../action"; export type SceneSnapshot = { state: SceneDataRaw | null; local: Record; element: PlayerStateElementSnapshot; background: ImageDataRaw | null; }; export declare class SceneAction extends TypedAction { static ActionTypes: { readonly action: "scene:action"; readonly init: "scene:init"; readonly exit: "scene:exit"; readonly jumpTo: "scene:jumpTo"; readonly setBackgroundMusic: "scene:setBackgroundMusic"; readonly preUnmount: "scene:preUnmount"; readonly transitionToScene: "scene:transitionToScene"; readonly nvlBlock: "scene:nvlBlock"; readonly nvlShow: "scene:nvlShow"; readonly nvlHide: "scene:nvlHide"; readonly nvlEnd: "scene:nvlEnd"; }; static handleSceneInit(scene: Scene, next: CalledActionResult, state: GameState, awaitable: Awaitable): { type: any; node: ContentNode | null; wait?: import("../../gameTypes").StackModelWaiting | null; } | Awaitable; /** * Initialize background music for the target scene. * Waits until the previous BGM has completely faded out (if any) before * resolving, ensuring seamless audio transition when jumping between scenes. */ static initBackgroundMusic(scene: Scene, exposed: ExposedState[ExposedStateType.scene]): Promise; static createSceneSnapshot(scene: Scene, state: GameState): SceneSnapshot; static restoreSceneSnapshot(snapshot: SceneSnapshot, state: GameState): void; applyTransition(gameState: GameState, transition: ImageTransition, injection: ActionExecutionInjection): Awaitable; exit(state: GameState): void; applyNvlVisibility(gameState: GameState, visible: boolean, options: Partial | undefined, injection: ActionExecutionInjection): CalledActionResult | Awaitable; executeAction(gameState: GameState, injection: ActionExecutionInjection): ExecutedActionResult; getFutureActions(story: Story, searchOptions?: ActionSearchOptions): LogicAction.Actions[]; _sceneNotFoundError(sceneId: string): Error; getSceneName(scene: Scene | string): string; stringify(story: Story, seen: Set, _strict: boolean): string; }