@drincs/nqtr
Version:
A complete system introducing the concepts of location, time and event, producing the framework of a not-quite-point-and-click adventure game.
270 lines (260 loc) • 6.97 kB
TypeScript
import { T as TimeSchedulingInterface, D as DateSchedulingInterface, C as CommitmentInterface, A as ActivityInterface } from './RoomInterface-Dh89PtFM.js';
import { E as ExecutionType, a as OnRunEvent, Q as QuestInterface, d as QuestsRequiredType, S as StageInterface } from './StageInterface-C1Zfcpk3.js';
interface ActivityProps {
/**
* The name
* @default ""
*/
name?: string;
/**
* Time slot in which activity/commitment will be active.
*/
timeSlot?: TimeSchedulingInterface;
/**
* Used to schedule what date it will be added and removed.
*/
dateScheduling?: DateSchedulingInterface;
/**
* Whether is disabled. You can also pass a Pixi'VN flag name.
* @default false
*/
disabled?: boolean | string;
/**
* Whether is hidden. You can also pass a Pixi'VN flag name.
* @default false
*/
hidden?: boolean | string;
/**
* The icon of the activity.
* @default undefined
*/
renderIcon?: string;
}
interface CommitmentProps {
/**
* The name
* @default ""
*/
name?: string;
/**
* Time slot in which activity/commitment will be active.
*/
readonly timeSlot?: TimeSchedulingInterface | undefined;
/**
* Used to schedule what date it will be added and removed.
*/
readonly dateScheduling?: DateSchedulingInterface | undefined;
/**
* The image ofthe Commitment.
*/
image?: string;
/**
* Execution type. If is "automatic" the onRun() runned automatically when the palayer is in the room. If is "interaction" the player must interact with the character to run the onRun() function.
* If you set "automatic" remember to remove the commitment when it is no longer needed, because otherwise it repeats itself every time.
* @default "interaction"
*/
executionType?: ExecutionType;
/**
* Is a function that is called when the player interacts with the character.
* @param commitment
* @returns
* @default undefined
*/
onRun?: OnRunEvent<CommitmentInterface>;
/**
* Whether is disabled. You can also pass a Pixi'VN flag name.
* If it is disabled this commitment will not be taken into consideration. So the characters will not be in the room, but will be busy with other commitments.
* @default false
*/
disabled?: boolean | string;
/**
* Whether is hidden. You can also pass a Pixi'VN flag name.
* @default false
*/
hidden?: boolean | string;
/**
* The icon of the commitment.
*/
icon?: string;
/**
* The priority. The higher the number, the higher the priority.
* To ensure that a character is not in 2 places at the same time, if there are 2 or more valid commits at the same time and with the same character, the one with the highest priority will be chosen.
* @default 0
*/
priority?: number;
}
interface LocationBaseModelProps {
/**
* The name
* @default ""
*/
name?: string;
/**
* Whether is disabled. You can also pass a Pixi'VN flag name.
* @default false
*/
disabled?: boolean | string;
/**
* Whether is hidden. You can also pass a Pixi'VN flag name.
* @default false
*/
hidden?: boolean | string;
/**
* The icon of the location.
* @default undefined
*/
icon?: string;
/**
* The activities that are available in this location.
* @default []
*/
activities?: ActivityInterface[];
}
interface MapBaseModelProps {
/**
* The name
* @default ""
*/
name?: string;
/**
* The image of the map.
* @default undefined
*/
image?: string;
/**
* The activities that are available in this map.
* @default []
*/
activities?: ActivityInterface[];
}
interface RoomBaseModelProps {
/**
* The name
* @default ""
*/
name?: string;
/**
* The image of the room.
* @default undefined
*/
image?: string;
/**
* The activities that are available in this room.
* @default []
*/
activities?: ActivityInterface[];
/**
* Whether is disabled. You can also pass a Pixi'VN flag name.
* @default false
*/
disabled?: boolean | string;
/**
* Whether is hidden. You can also pass a Pixi'VN flag name.
* @default false
*/
hidden?: boolean | string;
/**
* The icon of the room.
* @default undefined
*/
icon?: string;
}
interface QuestProps {
/**
* The name of the quest.
* @default ""
*/
name?: string;
/**
* The description of the quest.
* @default ""
*/
description?: string;
/**
* The icon of the quest.
* @default undefined
*/
icon?: string;
/**
* The image of the quest.
*/
image?: string;
/**
* If the quest is in development.
* @default false
*/
inDevelopment?: boolean;
/**
* The function that will be executed when the quest starts.
*/
onStart?: OnRunEvent<QuestInterface>;
/**
* The function that will be executed when a stage end in the quest.
*/
onNextStage?: OnRunEvent<QuestInterface>;
}
interface StageFlags {
/**
* The flag for checking if the condition is met.
*/
flag: string;
/**
* The description of the flag.
*/
description: string;
}
interface StageProps {
/**
* The flags of the stage.
* @default []
*/
flags?: StageFlags[];
/**
* The name of the stage.
* @default ""
*/
name?: string;
/**
* The description of the stage.
* @default ""
*/
description?: string;
/**
* The advice description of the stage.
* @default ""
*/
adviceDescription?: string;
/**
* The image of the stage.
*/
image?: string;
/**
* The number of day/date required to start the stage.
* @example If the value is 3, and the previous stage ends on date 1, the stage will start on date 4.
*/
deltaDateRequired?: number;
/**
* The flags required to start the stage.
* @default []
*/
flagsRequired?: StageFlags[];
/**
* The quests required to start the stage.
* @default []
*/
questsRequired?: QuestsRequiredType[];
/**
* The description to request to start the stage.
* @default ""
*/
requestDescriptionToStart?: string;
/**
* The function that will be executed when the stage starts.
*/
onStart?: OnRunEvent<StageInterface>;
/**
* The function that will be executed when the stage ends.
*/
onEnd?: OnRunEvent<StageInterface>;
}
export type { ActivityProps as A, CommitmentProps as C, LocationBaseModelProps as L, MapBaseModelProps as M, QuestProps as Q, RoomBaseModelProps as R, StageProps as S, StageFlags as a };