@drincs/pixi-vn
Version:
Pixi'VN is a npm package that provides various features for creating visual novels.
121 lines (118 loc) • 3.67 kB
TypeScript
import deepDiff from 'deep-diff';
import { Difference } from 'microdiff';
import { IStoratedChoiceMenuOption } from '../classes/ChoiceMenuOption.js';
import { StorageElementType } from '../types/StorageElementType.js';
import ExportedCanvas from './export/ExportedCanvas.js';
import ExportedSounds from './export/ExportedSounds.js';
import OpenedLabel from './OpenedLabel.js';
import ExportedStorage from './export/ExportedStorage.js';
import { LabelIdType } from '../types/LabelIdType.js';
import Dialogue from '../classes/Dialogue.js';
import '../classes/Label.js';
import '../classes/LabelAbstract.js';
import '../types/StepLabelType.js';
import '@drincs/pixi-vn';
import './LabelProps.js';
import '../types/CloseType.js';
import '../types/LabelRunModeType.js';
import '../types/PauseTickerType.js';
import './canvas/memory/CanvasBaseItemMemory.js';
import './canvas/memory/ContainerMemory.js';
import 'pixi.js';
import '../types/ContainerChild.js';
import '../classes/canvas/CanvasBaseItem.js';
import './TickerHistory.js';
import '../types/TickerIdType.js';
import './TickerArgs.js';
import './TickersSequence.js';
import '../types/PauseType.js';
import '../types/RepeatType.js';
import './SoundOptions.js';
import '@pixi/sound';
import '../types/SoundFilterMemory.js';
import './CharacterInterface.js';
/**
* AdditionalShaSpetsEnum is a enum that contains the additional sha1 values that can be inserted in the step sha1.
*/
declare enum AdditionalShaSpetsEnum {
/**
* If the creation of a step function sha was not successful, this value will be inserted.
*/
ERROR = "error",
/**
* If this story node was not added in the narrative but by the developer, this value will be inserted.
*/
DEVELOPER = "dev"
}
/**
* IHistoryStep is a interface that contains the information of a step in the history.
*/
interface HistoryStepData {
/**
* The browser path that occurred during the progression of the steps.
*/
path: string;
/**
* The storage that occurred during the progression of the steps.
*/
storage: ExportedStorage;
/**
* The index of the label that occurred during the progression of the steps.
*/
labelIndex: number;
/**
* The canvas that occurred during the progression of the steps.
*/
canvas: ExportedCanvas;
/**
* The opened labels that occurred during the progression of the steps.
*/
openedLabels: OpenedLabel[];
/**
* The sound data that occurred during the progression of the steps.
*/
sound: ExportedSounds;
}
interface HistoryStep<T extends Dialogue = Dialogue> {
/**
* The difference between the previous step and the current step.
*/
diff?: deepDiff.Diff<HistoryStepData, HistoryStepData>[] | Difference[];
/**
* The label id of the current step.
*/
currentLabel?: LabelIdType;
/**
* The sha1 of the step function.
*/
stepSha1: string;
/**
* The index of the step in the history.
*/
index: number;
/**
* The data of the step of the label.
*/
labelStepIndex: number | null;
/**
* Dialogue to be shown in the game
*/
dialoge?: T;
/**
* List of choices asked of the player
*/
choices?: IStoratedChoiceMenuOption[];
/**
* List of choices already made by the player
*/
alreadyMadeChoices?: number[];
/**
* The input value of the player
*/
inputValue?: StorageElementType;
/**
* The choice made by the player
*/
choiceIndexMade?: number;
}
export { AdditionalShaSpetsEnum, type HistoryStepData, type HistoryStep as default };