@drincs/nqtr 0.3.7 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/RoomInterface-BRA386zn.d.mts +171 -0
- package/dist/RoomInterface-Cwm08AzD.d.ts +171 -0
- package/dist/{StageInterface-DX74DUxG.d.mts → StageInterface-LDgQToad.d.mts} +28 -14
- package/dist/{StageInterface-DX74DUxG.d.ts → StageInterface-LDgQToad.d.ts} +28 -14
- package/dist/classes/index.cjs +2 -0
- package/dist/classes/index.cjs.map +1 -0
- package/dist/classes/index.d.mts +508 -31
- package/dist/classes/index.d.ts +508 -31
- package/dist/classes/index.mjs +1 -1
- package/dist/classes/index.mjs.map +1 -1
- package/dist/decorators/index.cjs +2 -0
- package/dist/decorators/index.cjs.map +1 -0
- package/dist/decorators/index.d.mts +161 -9
- package/dist/decorators/index.d.ts +161 -9
- package/dist/decorators/index.mjs +1 -1
- package/dist/decorators/index.mjs.map +1 -1
- package/dist/index-B-x-OmU2.d.ts +186 -0
- package/dist/index-CJubtUni.d.mts +301 -0
- package/dist/index-Cq_kqDbo.d.ts +301 -0
- package/dist/index-k8ho_YWr.d.mts +186 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +16 -46
- package/dist/index.d.ts +16 -46
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/interface/index.cjs +2 -0
- package/dist/{functions/index.js.map → interface/index.cjs.map} +1 -1
- package/dist/interface/index.d.mts +3 -14
- package/dist/interface/index.d.ts +3 -14
- package/dist/managers/index.cjs +2 -0
- package/dist/managers/index.cjs.map +1 -0
- package/dist/managers/index.d.mts +4 -17
- package/dist/managers/index.d.ts +4 -17
- package/dist/managers/index.mjs +1 -1
- package/dist/managers/index.mjs.map +1 -1
- package/dist/types/index.cjs +2 -0
- package/dist/{functions/index.mjs.map → types/index.cjs.map} +1 -1
- package/dist/types/index.d.mts +60 -4
- package/dist/types/index.d.ts +60 -4
- package/package.json +13 -5
- package/dist/RoomInterface-CdAM_q7P.d.ts +0 -83
- package/dist/RoomInterface-DURfkQ7u.d.mts +0 -83
- package/dist/classes/ActivityBaseModel.d.mts +0 -63
- package/dist/classes/ActivityBaseModel.d.ts +0 -63
- package/dist/classes/ActivityBaseModel.js +0 -2
- package/dist/classes/ActivityBaseModel.js.map +0 -1
- package/dist/classes/ActivityBaseModel.mjs +0 -2
- package/dist/classes/ActivityBaseModel.mjs.map +0 -1
- package/dist/classes/ActivityStoredClass.d.mts +0 -27
- package/dist/classes/ActivityStoredClass.d.ts +0 -27
- package/dist/classes/ActivityStoredClass.js +0 -2
- package/dist/classes/ActivityStoredClass.js.map +0 -1
- package/dist/classes/ActivityStoredClass.mjs +0 -2
- package/dist/classes/ActivityStoredClass.mjs.map +0 -1
- package/dist/classes/CommitmentBaseModel.d.mts +0 -65
- package/dist/classes/CommitmentBaseModel.d.ts +0 -65
- package/dist/classes/CommitmentBaseModel.js +0 -2
- package/dist/classes/CommitmentBaseModel.js.map +0 -1
- package/dist/classes/CommitmentBaseModel.mjs +0 -2
- package/dist/classes/CommitmentBaseModel.mjs.map +0 -1
- package/dist/classes/CommitmentStoredClass.d.mts +0 -31
- package/dist/classes/CommitmentStoredClass.d.ts +0 -31
- package/dist/classes/CommitmentStoredClass.js +0 -2
- package/dist/classes/CommitmentStoredClass.js.map +0 -1
- package/dist/classes/CommitmentStoredClass.mjs +0 -2
- package/dist/classes/CommitmentStoredClass.mjs.map +0 -1
- package/dist/classes/index.js +0 -2
- package/dist/classes/index.js.map +0 -1
- package/dist/classes/navigation/LocationBaseModel.d.mts +0 -54
- package/dist/classes/navigation/LocationBaseModel.d.ts +0 -54
- package/dist/classes/navigation/LocationBaseModel.js +0 -2
- package/dist/classes/navigation/LocationBaseModel.js.map +0 -1
- package/dist/classes/navigation/LocationBaseModel.mjs +0 -2
- package/dist/classes/navigation/LocationBaseModel.mjs.map +0 -1
- package/dist/classes/navigation/LocationStoredClass.d.mts +0 -23
- package/dist/classes/navigation/LocationStoredClass.d.ts +0 -23
- package/dist/classes/navigation/LocationStoredClass.js +0 -2
- package/dist/classes/navigation/LocationStoredClass.js.map +0 -1
- package/dist/classes/navigation/LocationStoredClass.mjs +0 -2
- package/dist/classes/navigation/LocationStoredClass.mjs.map +0 -1
- package/dist/classes/navigation/MapBaseModel.d.mts +0 -41
- package/dist/classes/navigation/MapBaseModel.d.ts +0 -41
- package/dist/classes/navigation/MapBaseModel.js +0 -2
- package/dist/classes/navigation/MapBaseModel.js.map +0 -1
- package/dist/classes/navigation/MapBaseModel.mjs +0 -2
- package/dist/classes/navigation/MapBaseModel.mjs.map +0 -1
- package/dist/classes/navigation/MapStoredClass.d.mts +0 -14
- package/dist/classes/navigation/MapStoredClass.d.ts +0 -14
- package/dist/classes/navigation/MapStoredClass.js +0 -2
- package/dist/classes/navigation/MapStoredClass.js.map +0 -1
- package/dist/classes/navigation/MapStoredClass.mjs +0 -2
- package/dist/classes/navigation/MapStoredClass.mjs.map +0 -1
- package/dist/classes/navigation/NavigationAbstractClass.d.mts +0 -48
- package/dist/classes/navigation/NavigationAbstractClass.d.ts +0 -48
- package/dist/classes/navigation/NavigationAbstractClass.js +0 -2
- package/dist/classes/navigation/NavigationAbstractClass.js.map +0 -1
- package/dist/classes/navigation/NavigationAbstractClass.mjs +0 -2
- package/dist/classes/navigation/NavigationAbstractClass.mjs.map +0 -1
- package/dist/classes/navigation/RoomBaseModel.d.mts +0 -67
- package/dist/classes/navigation/RoomBaseModel.d.ts +0 -67
- package/dist/classes/navigation/RoomBaseModel.js +0 -2
- package/dist/classes/navigation/RoomBaseModel.js.map +0 -1
- package/dist/classes/navigation/RoomBaseModel.mjs +0 -2
- package/dist/classes/navigation/RoomBaseModel.mjs.map +0 -1
- package/dist/classes/navigation/RoomStoredClass.d.mts +0 -24
- package/dist/classes/navigation/RoomStoredClass.d.ts +0 -24
- package/dist/classes/navigation/RoomStoredClass.js +0 -2
- package/dist/classes/navigation/RoomStoredClass.js.map +0 -1
- package/dist/classes/navigation/RoomStoredClass.mjs +0 -2
- package/dist/classes/navigation/RoomStoredClass.mjs.map +0 -1
- package/dist/classes/quest/QuestBaseModel.d.mts +0 -36
- package/dist/classes/quest/QuestBaseModel.d.ts +0 -36
- package/dist/classes/quest/QuestBaseModel.js +0 -2
- package/dist/classes/quest/QuestBaseModel.js.map +0 -1
- package/dist/classes/quest/QuestBaseModel.mjs +0 -2
- package/dist/classes/quest/QuestBaseModel.mjs.map +0 -1
- package/dist/classes/quest/QuestStoredClass.d.mts +0 -37
- package/dist/classes/quest/QuestStoredClass.d.ts +0 -37
- package/dist/classes/quest/QuestStoredClass.js +0 -2
- package/dist/classes/quest/QuestStoredClass.js.map +0 -1
- package/dist/classes/quest/QuestStoredClass.mjs +0 -2
- package/dist/classes/quest/QuestStoredClass.mjs.map +0 -1
- package/dist/classes/quest/StageBaseModel.d.mts +0 -50
- package/dist/classes/quest/StageBaseModel.d.ts +0 -50
- package/dist/classes/quest/StageBaseModel.js +0 -2
- package/dist/classes/quest/StageBaseModel.js.map +0 -1
- package/dist/classes/quest/StageBaseModel.mjs +0 -2
- package/dist/classes/quest/StageBaseModel.mjs.map +0 -1
- package/dist/classes/quest/StageStoredClass.d.mts +0 -46
- package/dist/classes/quest/StageStoredClass.d.ts +0 -46
- package/dist/classes/quest/StageStoredClass.js +0 -2
- package/dist/classes/quest/StageStoredClass.js.map +0 -1
- package/dist/classes/quest/StageStoredClass.mjs +0 -2
- package/dist/classes/quest/StageStoredClass.mjs.map +0 -1
- package/dist/constants.d.mts +0 -4
- package/dist/constants.d.ts +0 -4
- package/dist/constants.js +0 -2
- package/dist/constants.js.map +0 -1
- package/dist/constants.mjs +0 -2
- package/dist/constants.mjs.map +0 -1
- package/dist/decorators/ActivityDecorator.d.mts +0 -15
- package/dist/decorators/ActivityDecorator.d.ts +0 -15
- package/dist/decorators/ActivityDecorator.js +0 -2
- package/dist/decorators/ActivityDecorator.js.map +0 -1
- package/dist/decorators/ActivityDecorator.mjs +0 -2
- package/dist/decorators/ActivityDecorator.mjs.map +0 -1
- package/dist/decorators/CommitmentDecorator.d.mts +0 -27
- package/dist/decorators/CommitmentDecorator.d.ts +0 -27
- package/dist/decorators/CommitmentDecorator.js +0 -2
- package/dist/decorators/CommitmentDecorator.js.map +0 -1
- package/dist/decorators/CommitmentDecorator.mjs +0 -2
- package/dist/decorators/CommitmentDecorator.mjs.map +0 -1
- package/dist/decorators/QuestDecorator.d.mts +0 -22
- package/dist/decorators/QuestDecorator.d.ts +0 -22
- package/dist/decorators/QuestDecorator.js +0 -2
- package/dist/decorators/QuestDecorator.js.map +0 -1
- package/dist/decorators/QuestDecorator.mjs +0 -2
- package/dist/decorators/QuestDecorator.mjs.map +0 -1
- package/dist/decorators/RoomDecorator.d.mts +0 -28
- package/dist/decorators/RoomDecorator.d.ts +0 -28
- package/dist/decorators/RoomDecorator.js +0 -2
- package/dist/decorators/RoomDecorator.js.map +0 -1
- package/dist/decorators/RoomDecorator.mjs +0 -2
- package/dist/decorators/RoomDecorator.mjs.map +0 -1
- package/dist/decorators/index.js +0 -2
- package/dist/decorators/index.js.map +0 -1
- package/dist/functions/index.d.mts +0 -2
- package/dist/functions/index.d.ts +0 -2
- package/dist/functions/index.js +0 -2
- package/dist/functions/index.mjs +0 -2
- package/dist/index.js +0 -2
- package/dist/index.js.map +0 -1
- package/dist/interface/ActivityInterface.d.mts +0 -40
- package/dist/interface/ActivityInterface.d.ts +0 -40
- package/dist/interface/ActivityInterface.js +0 -2
- package/dist/interface/ActivityInterface.js.map +0 -1
- package/dist/interface/ActivityInterface.mjs +0 -2
- package/dist/interface/ActivityInterface.mjs.map +0 -1
- package/dist/interface/ActivityProps.d.mts +0 -48
- package/dist/interface/ActivityProps.d.ts +0 -48
- package/dist/interface/ActivityProps.js +0 -2
- package/dist/interface/ActivityProps.js.map +0 -1
- package/dist/interface/ActivityProps.mjs +0 -2
- package/dist/interface/ActivityProps.mjs.map +0 -1
- package/dist/interface/CommitmentInterface.d.mts +0 -6
- package/dist/interface/CommitmentInterface.d.ts +0 -6
- package/dist/interface/CommitmentInterface.js +0 -2
- package/dist/interface/CommitmentInterface.js.map +0 -1
- package/dist/interface/CommitmentInterface.mjs +0 -2
- package/dist/interface/CommitmentInterface.mjs.map +0 -1
- package/dist/interface/CommitmentProps.d.mts +0 -79
- package/dist/interface/CommitmentProps.d.ts +0 -79
- package/dist/interface/CommitmentProps.js +0 -2
- package/dist/interface/CommitmentProps.js.map +0 -1
- package/dist/interface/CommitmentProps.mjs +0 -2
- package/dist/interface/CommitmentProps.mjs.map +0 -1
- package/dist/interface/index.js +0 -2
- package/dist/interface/index.js.map +0 -1
- package/dist/interface/navigation/LocationBaseModelProps.d.mts +0 -32
- package/dist/interface/navigation/LocationBaseModelProps.d.ts +0 -32
- package/dist/interface/navigation/LocationBaseModelProps.js +0 -2
- package/dist/interface/navigation/LocationBaseModelProps.js.map +0 -1
- package/dist/interface/navigation/LocationBaseModelProps.mjs +0 -2
- package/dist/interface/navigation/LocationBaseModelProps.mjs.map +0 -1
- package/dist/interface/navigation/LocationInterface.d.mts +0 -6
- package/dist/interface/navigation/LocationInterface.d.ts +0 -6
- package/dist/interface/navigation/LocationInterface.js +0 -2
- package/dist/interface/navigation/LocationInterface.js.map +0 -1
- package/dist/interface/navigation/LocationInterface.mjs +0 -2
- package/dist/interface/navigation/LocationInterface.mjs.map +0 -1
- package/dist/interface/navigation/MapBaseModelProps.d.mts +0 -22
- package/dist/interface/navigation/MapBaseModelProps.d.ts +0 -22
- package/dist/interface/navigation/MapBaseModelProps.js +0 -2
- package/dist/interface/navigation/MapBaseModelProps.js.map +0 -1
- package/dist/interface/navigation/MapBaseModelProps.mjs +0 -2
- package/dist/interface/navigation/MapBaseModelProps.mjs.map +0 -1
- package/dist/interface/navigation/MapInterface.d.mts +0 -6
- package/dist/interface/navigation/MapInterface.d.ts +0 -6
- package/dist/interface/navigation/MapInterface.js +0 -2
- package/dist/interface/navigation/MapInterface.js.map +0 -1
- package/dist/interface/navigation/MapInterface.mjs +0 -2
- package/dist/interface/navigation/MapInterface.mjs.map +0 -1
- package/dist/interface/navigation/NavigationAbstractClass.d.mts +0 -54
- package/dist/interface/navigation/NavigationAbstractClass.d.ts +0 -54
- package/dist/interface/navigation/NavigationAbstractClass.js +0 -2
- package/dist/interface/navigation/NavigationAbstractClass.js.map +0 -1
- package/dist/interface/navigation/NavigationAbstractClass.mjs +0 -2
- package/dist/interface/navigation/NavigationAbstractClass.mjs.map +0 -1
- package/dist/interface/navigation/RoomBaseModelProps.d.mts +0 -37
- package/dist/interface/navigation/RoomBaseModelProps.d.ts +0 -37
- package/dist/interface/navigation/RoomBaseModelProps.js +0 -2
- package/dist/interface/navigation/RoomBaseModelProps.js.map +0 -1
- package/dist/interface/navigation/RoomBaseModelProps.mjs +0 -2
- package/dist/interface/navigation/RoomBaseModelProps.mjs.map +0 -1
- package/dist/interface/navigation/RoomInterface.d.mts +0 -6
- package/dist/interface/navigation/RoomInterface.d.ts +0 -6
- package/dist/interface/navigation/RoomInterface.js +0 -2
- package/dist/interface/navigation/RoomInterface.js.map +0 -1
- package/dist/interface/navigation/RoomInterface.mjs +0 -2
- package/dist/interface/navigation/RoomInterface.mjs.map +0 -1
- package/dist/interface/quest/QuestInterface.d.mts +0 -2
- package/dist/interface/quest/QuestInterface.d.ts +0 -2
- package/dist/interface/quest/QuestInterface.js +0 -2
- package/dist/interface/quest/QuestInterface.js.map +0 -1
- package/dist/interface/quest/QuestInterface.mjs +0 -2
- package/dist/interface/quest/QuestInterface.mjs.map +0 -1
- package/dist/interface/quest/QuestProps.d.mts +0 -39
- package/dist/interface/quest/QuestProps.d.ts +0 -39
- package/dist/interface/quest/QuestProps.js +0 -2
- package/dist/interface/quest/QuestProps.js.map +0 -1
- package/dist/interface/quest/QuestProps.mjs +0 -2
- package/dist/interface/quest/QuestProps.mjs.map +0 -1
- package/dist/interface/quest/StageFlags.d.mts +0 -12
- package/dist/interface/quest/StageFlags.d.ts +0 -12
- package/dist/interface/quest/StageFlags.js +0 -2
- package/dist/interface/quest/StageFlags.js.map +0 -1
- package/dist/interface/quest/StageFlags.mjs +0 -2
- package/dist/interface/quest/StageFlags.mjs.map +0 -1
- package/dist/interface/quest/StageInterface.d.mts +0 -2
- package/dist/interface/quest/StageInterface.d.ts +0 -2
- package/dist/interface/quest/StageInterface.js +0 -2
- package/dist/interface/quest/StageInterface.js.map +0 -1
- package/dist/interface/quest/StageInterface.mjs +0 -2
- package/dist/interface/quest/StageInterface.mjs.map +0 -1
- package/dist/interface/quest/StageProps.d.mts +0 -60
- package/dist/interface/quest/StageProps.d.ts +0 -60
- package/dist/interface/quest/StageProps.js +0 -2
- package/dist/interface/quest/StageProps.js.map +0 -1
- package/dist/interface/quest/StageProps.mjs +0 -2
- package/dist/interface/quest/StageProps.mjs.map +0 -1
- package/dist/managers/NavigatorManager.d.mts +0 -22
- package/dist/managers/NavigatorManager.d.ts +0 -22
- package/dist/managers/NavigatorManager.js +0 -2
- package/dist/managers/NavigatorManager.js.map +0 -1
- package/dist/managers/NavigatorManager.mjs +0 -2
- package/dist/managers/NavigatorManager.mjs.map +0 -1
- package/dist/managers/QuestManager.d.mts +0 -17
- package/dist/managers/QuestManager.d.ts +0 -17
- package/dist/managers/QuestManager.js +0 -2
- package/dist/managers/QuestManager.js.map +0 -1
- package/dist/managers/QuestManager.mjs +0 -2
- package/dist/managers/QuestManager.mjs.map +0 -1
- package/dist/managers/RoutineManager.d.mts +0 -59
- package/dist/managers/RoutineManager.d.ts +0 -59
- package/dist/managers/RoutineManager.js +0 -2
- package/dist/managers/RoutineManager.js.map +0 -1
- package/dist/managers/RoutineManager.mjs +0 -2
- package/dist/managers/RoutineManager.mjs.map +0 -1
- package/dist/managers/TimeManager.d.mts +0 -74
- package/dist/managers/TimeManager.d.ts +0 -74
- package/dist/managers/TimeManager.js +0 -2
- package/dist/managers/TimeManager.js.map +0 -1
- package/dist/managers/TimeManager.mjs +0 -2
- package/dist/managers/TimeManager.mjs.map +0 -1
- package/dist/managers/TimeManagerSettings.d.mts +0 -13
- package/dist/managers/TimeManagerSettings.d.ts +0 -13
- package/dist/managers/TimeManagerSettings.js +0 -2
- package/dist/managers/TimeManagerSettings.js.map +0 -1
- package/dist/managers/TimeManagerSettings.mjs +0 -2
- package/dist/managers/TimeManagerSettings.mjs.map +0 -1
- package/dist/managers/index.js +0 -2
- package/dist/managers/index.js.map +0 -1
- package/dist/nqtr.d.d.mts +0 -195
- package/dist/nqtr.d.d.ts +0 -195
- package/dist/nqtr.d.js +0 -2
- package/dist/nqtr.d.js.map +0 -1
- package/dist/nqtr.d.mjs +0 -2
- package/dist/nqtr.d.mjs.map +0 -1
- package/dist/types/ExecutionType.d.mts +0 -3
- package/dist/types/ExecutionType.d.ts +0 -3
- package/dist/types/ExecutionType.js +0 -2
- package/dist/types/ExecutionType.js.map +0 -1
- package/dist/types/ExecutionType.mjs +0 -2
- package/dist/types/ExecutionType.mjs.map +0 -1
- package/dist/types/OnRunEvent.d.mts +0 -9
- package/dist/types/OnRunEvent.d.ts +0 -9
- package/dist/types/OnRunEvent.js +0 -2
- package/dist/types/OnRunEvent.js.map +0 -1
- package/dist/types/OnRunEvent.mjs +0 -2
- package/dist/types/OnRunEvent.mjs.map +0 -1
- package/dist/types/QuestsRequired.d.mts +0 -2
- package/dist/types/QuestsRequired.d.ts +0 -2
- package/dist/types/QuestsRequired.js +0 -2
- package/dist/types/QuestsRequired.js.map +0 -1
- package/dist/types/QuestsRequired.mjs +0 -2
- package/dist/types/QuestsRequired.mjs.map +0 -1
- package/dist/types/TimeDataType.d.mts +0 -6
- package/dist/types/TimeDataType.d.ts +0 -6
- package/dist/types/TimeDataType.js +0 -2
- package/dist/types/TimeDataType.js.map +0 -1
- package/dist/types/TimeDataType.mjs +0 -2
- package/dist/types/TimeDataType.mjs.map +0 -1
- package/dist/types/TimeSettings.d.mts +0 -58
- package/dist/types/TimeSettings.d.ts +0 -58
- package/dist/types/TimeSettings.js +0 -2
- package/dist/types/TimeSettings.js.map +0 -1
- package/dist/types/TimeSettings.mjs +0 -2
- package/dist/types/TimeSettings.mjs.map +0 -1
- package/dist/types/index.js +0 -2
- package/dist/types/index.js.map +0 -1
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import { C as CommitmentInterface, A as ActivityInterface } from './RoomInterface-Cwm08AzD.js';
|
|
2
|
+
import { E as ExecutionType, a as OnRunEvent, Q as QuestInterface, d as QuestsRequiredType, S as StageInterface } from './StageInterface-LDgQToad.js';
|
|
3
|
+
|
|
4
|
+
interface ActivityProps {
|
|
5
|
+
/**
|
|
6
|
+
* The name
|
|
7
|
+
* @default ""
|
|
8
|
+
*/
|
|
9
|
+
name?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The hour when the activity starts. If the activity is not started yet, it will be hidden.
|
|
12
|
+
* If you set 3, the activity will be hidden into hours 1 and 2, and will be shown from hour 3.
|
|
13
|
+
* @default timeTracker.minDayHours
|
|
14
|
+
*/
|
|
15
|
+
fromHour?: number;
|
|
16
|
+
/**
|
|
17
|
+
* The hour when the activity ends. If the activity is ended yet, it will be hidden.
|
|
18
|
+
* If you set 3, the activity will be shown into hours 1 and 2 and will be hidden from hour 3.
|
|
19
|
+
* @default timeTracker.maxDayHours + 1
|
|
20
|
+
*/
|
|
21
|
+
toHour?: number;
|
|
22
|
+
/**
|
|
23
|
+
* The day when the activity starts. If the activity is not started yet, it will be hidden.
|
|
24
|
+
* If you set 3, the activity will be hidden into days 1 and 2, and will be shown from day 3.
|
|
25
|
+
* @default undefined
|
|
26
|
+
*/
|
|
27
|
+
fromDay?: number;
|
|
28
|
+
/**
|
|
29
|
+
* The day when the activity ends. If the activity is ended yet, it will be deleted or hidden.
|
|
30
|
+
* If you set 3, the activity will be shown into days 1 and 2 and will be deleted or hidden from day 3.
|
|
31
|
+
* @default undefined
|
|
32
|
+
*/
|
|
33
|
+
toDay?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
disabled?: boolean | string;
|
|
39
|
+
/**
|
|
40
|
+
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
hidden?: boolean | string;
|
|
44
|
+
/**
|
|
45
|
+
* The icon of the activity.
|
|
46
|
+
* @default undefined
|
|
47
|
+
*/
|
|
48
|
+
renderIcon?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface CommitmentProps {
|
|
52
|
+
/**
|
|
53
|
+
* The name
|
|
54
|
+
* @default ""
|
|
55
|
+
*/
|
|
56
|
+
name?: string;
|
|
57
|
+
/**
|
|
58
|
+
* The hour when the commitment starts. If the commitment is not started yet, it will be hidden.
|
|
59
|
+
* If you set 3, the commitment will be hidden into hours 1 and 2, and will be shown from hour 3.
|
|
60
|
+
* @default timeTracker.minDayHours
|
|
61
|
+
*/
|
|
62
|
+
fromHour?: number;
|
|
63
|
+
/**
|
|
64
|
+
* The hour when the commitment ends. If the commitment is ended yet, it will be hidden.
|
|
65
|
+
* If you set 3, the commitment will be shown into hours 1 and 2 and will be hidden from hour 3.
|
|
66
|
+
* @default timeTracker.maxDayHours + 1
|
|
67
|
+
*/
|
|
68
|
+
toHour?: number;
|
|
69
|
+
/**
|
|
70
|
+
* The day when the commitment starts. If the commitment is not started yet, it will be hidden.
|
|
71
|
+
* If you set 3, the commitment will be hidden into days 1 and 2, and will be shown from day 3.
|
|
72
|
+
* @default undefined
|
|
73
|
+
*/
|
|
74
|
+
fromDay?: number;
|
|
75
|
+
/**
|
|
76
|
+
* The day when the commitment ends. If the commitment is ended yet, it will be deleted or hidden.
|
|
77
|
+
* If you set 3, the commitment will be shown into days 1 and 2 and will be deleted or hidden from day 3.
|
|
78
|
+
* @default undefined
|
|
79
|
+
*/
|
|
80
|
+
toDay?: number;
|
|
81
|
+
/**
|
|
82
|
+
* The image ofthe Commitment.
|
|
83
|
+
*/
|
|
84
|
+
image?: string;
|
|
85
|
+
/**
|
|
86
|
+
* 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.
|
|
87
|
+
* If you set "automatic" remember to remove the commitment when it is no longer needed, because otherwise it repeats itself every time.
|
|
88
|
+
* @default "interaction"
|
|
89
|
+
*/
|
|
90
|
+
executionType?: ExecutionType;
|
|
91
|
+
/**
|
|
92
|
+
* Is a function that is called when the player interacts with the character.
|
|
93
|
+
* @param commitment
|
|
94
|
+
* @returns
|
|
95
|
+
* @default undefined
|
|
96
|
+
*/
|
|
97
|
+
onRun?: OnRunEvent<CommitmentInterface>;
|
|
98
|
+
/**
|
|
99
|
+
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
100
|
+
* 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.
|
|
101
|
+
* @default false
|
|
102
|
+
*/
|
|
103
|
+
disabled?: boolean | string;
|
|
104
|
+
/**
|
|
105
|
+
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
106
|
+
* @default false
|
|
107
|
+
*/
|
|
108
|
+
hidden?: boolean | string;
|
|
109
|
+
/**
|
|
110
|
+
* The icon of the commitment.
|
|
111
|
+
*/
|
|
112
|
+
icon?: string;
|
|
113
|
+
/**
|
|
114
|
+
* The priority. The higher the number, the higher the priority.
|
|
115
|
+
* 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.
|
|
116
|
+
* @default 0
|
|
117
|
+
*/
|
|
118
|
+
priority?: number;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
interface LocationBaseModelProps {
|
|
122
|
+
/**
|
|
123
|
+
* The name
|
|
124
|
+
* @default ""
|
|
125
|
+
*/
|
|
126
|
+
name?: string;
|
|
127
|
+
/**
|
|
128
|
+
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
129
|
+
* @default false
|
|
130
|
+
*/
|
|
131
|
+
disabled?: boolean | string;
|
|
132
|
+
/**
|
|
133
|
+
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
134
|
+
* @default false
|
|
135
|
+
*/
|
|
136
|
+
hidden?: boolean | string;
|
|
137
|
+
/**
|
|
138
|
+
* The icon of the location.
|
|
139
|
+
* @default undefined
|
|
140
|
+
*/
|
|
141
|
+
icon?: string;
|
|
142
|
+
/**
|
|
143
|
+
* The activities that are available in this location.
|
|
144
|
+
* @default []
|
|
145
|
+
*/
|
|
146
|
+
activities?: ActivityInterface[];
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
interface MapBaseModelProps {
|
|
150
|
+
/**
|
|
151
|
+
* The name
|
|
152
|
+
* @default ""
|
|
153
|
+
*/
|
|
154
|
+
name?: string;
|
|
155
|
+
/**
|
|
156
|
+
* The image of the map.
|
|
157
|
+
* @default undefined
|
|
158
|
+
*/
|
|
159
|
+
image?: string;
|
|
160
|
+
/**
|
|
161
|
+
* The activities that are available in this map.
|
|
162
|
+
* @default []
|
|
163
|
+
*/
|
|
164
|
+
activities?: ActivityInterface[];
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
interface RoomBaseModelProps {
|
|
168
|
+
/**
|
|
169
|
+
* The name
|
|
170
|
+
* @default ""
|
|
171
|
+
*/
|
|
172
|
+
name?: string;
|
|
173
|
+
/**
|
|
174
|
+
* The image of the room.
|
|
175
|
+
* @default undefined
|
|
176
|
+
*/
|
|
177
|
+
image?: string;
|
|
178
|
+
/**
|
|
179
|
+
* The activities that are available in this room.
|
|
180
|
+
* @default []
|
|
181
|
+
*/
|
|
182
|
+
activities?: ActivityInterface[];
|
|
183
|
+
/**
|
|
184
|
+
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
185
|
+
* @default false
|
|
186
|
+
*/
|
|
187
|
+
disabled?: boolean | string;
|
|
188
|
+
/**
|
|
189
|
+
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
190
|
+
* @default false
|
|
191
|
+
*/
|
|
192
|
+
hidden?: boolean | string;
|
|
193
|
+
/**
|
|
194
|
+
* The icon of the room.
|
|
195
|
+
* @default undefined
|
|
196
|
+
*/
|
|
197
|
+
icon?: string;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
interface QuestProps {
|
|
201
|
+
/**
|
|
202
|
+
* The name of the quest.
|
|
203
|
+
* @default ""
|
|
204
|
+
*/
|
|
205
|
+
name?: string;
|
|
206
|
+
/**
|
|
207
|
+
* The description of the quest.
|
|
208
|
+
* @default ""
|
|
209
|
+
*/
|
|
210
|
+
description?: string;
|
|
211
|
+
/**
|
|
212
|
+
* The icon of the quest.
|
|
213
|
+
* @default undefined
|
|
214
|
+
*/
|
|
215
|
+
icon?: string;
|
|
216
|
+
/**
|
|
217
|
+
* The image of the quest.
|
|
218
|
+
*/
|
|
219
|
+
image?: string;
|
|
220
|
+
/**
|
|
221
|
+
* If the quest is in development.
|
|
222
|
+
* @default false
|
|
223
|
+
*/
|
|
224
|
+
inDevelopment?: boolean;
|
|
225
|
+
/**
|
|
226
|
+
* The function that will be executed when the quest starts.
|
|
227
|
+
*/
|
|
228
|
+
onStart?: OnRunEvent<QuestInterface>;
|
|
229
|
+
/**
|
|
230
|
+
* The function that will be executed when a stage end in the quest.
|
|
231
|
+
*/
|
|
232
|
+
onNextStage?: OnRunEvent<QuestInterface>;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
interface StageFlags {
|
|
236
|
+
/**
|
|
237
|
+
* The flag for checking if the condition is met.
|
|
238
|
+
*/
|
|
239
|
+
flag: string;
|
|
240
|
+
/**
|
|
241
|
+
* The description of the flag.
|
|
242
|
+
*/
|
|
243
|
+
description: string;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
interface StageProps {
|
|
247
|
+
/**
|
|
248
|
+
* The flags of the stage.
|
|
249
|
+
* @default []
|
|
250
|
+
*/
|
|
251
|
+
flags?: StageFlags[];
|
|
252
|
+
/**
|
|
253
|
+
* The name of the stage.
|
|
254
|
+
* @default ""
|
|
255
|
+
*/
|
|
256
|
+
name?: string;
|
|
257
|
+
/**
|
|
258
|
+
* The description of the stage.
|
|
259
|
+
* @default ""
|
|
260
|
+
*/
|
|
261
|
+
description?: string;
|
|
262
|
+
/**
|
|
263
|
+
* The advice description of the stage.
|
|
264
|
+
* @default ""
|
|
265
|
+
*/
|
|
266
|
+
adviceDescription?: string;
|
|
267
|
+
/**
|
|
268
|
+
* The image of the stage.
|
|
269
|
+
*/
|
|
270
|
+
image?: string;
|
|
271
|
+
/**
|
|
272
|
+
* The day required to start the stage.
|
|
273
|
+
* @example If the value is 3, and the previous stage ends on day 1, the stage will start on day 4.
|
|
274
|
+
*/
|
|
275
|
+
daysRequiredToStart?: number;
|
|
276
|
+
/**
|
|
277
|
+
* The flags required to start the stage.
|
|
278
|
+
* @default []
|
|
279
|
+
*/
|
|
280
|
+
flagsRequiredToStart?: StageFlags[];
|
|
281
|
+
/**
|
|
282
|
+
* The quests required to start the stage.
|
|
283
|
+
* @default []
|
|
284
|
+
*/
|
|
285
|
+
questsRequiredToStart?: QuestsRequiredType[];
|
|
286
|
+
/**
|
|
287
|
+
* The description to request to start the stage.
|
|
288
|
+
* @default ""
|
|
289
|
+
*/
|
|
290
|
+
requestDescriptionToStart?: string;
|
|
291
|
+
/**
|
|
292
|
+
* The function that will be executed when the stage starts.
|
|
293
|
+
*/
|
|
294
|
+
onStart?: OnRunEvent<StageInterface>;
|
|
295
|
+
/**
|
|
296
|
+
* The function that will be executed when the stage ends.
|
|
297
|
+
*/
|
|
298
|
+
onEnd?: OnRunEvent<StageInterface>;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
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 };
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { C as CommitmentInterface, R as RoomInterface, L as LocationInterface, M as MapInterface } from './RoomInterface-BRA386zn.mjs';
|
|
2
|
+
import { OnRunProps } from '@drincs/nqtr';
|
|
3
|
+
import { Q as QuestInterface } from './StageInterface-LDgQToad.mjs';
|
|
4
|
+
import { CharacterInterface } from '@drincs/pixi-vn';
|
|
5
|
+
import { TimeSettings, ITimeStlot } from './types/index.mjs';
|
|
6
|
+
|
|
7
|
+
declare class TimeManager {
|
|
8
|
+
initialize(settings: TimeSettings): void;
|
|
9
|
+
get minDayHours(): number;
|
|
10
|
+
get maxDayHours(): number;
|
|
11
|
+
get defaultTimeSpent(): number;
|
|
12
|
+
get timeSlots(): ITimeStlot[];
|
|
13
|
+
get weekLength(): number;
|
|
14
|
+
get weekendStartDay(): number;
|
|
15
|
+
get weekDaysNames(): string[];
|
|
16
|
+
/**
|
|
17
|
+
* Get the current hour
|
|
18
|
+
*/
|
|
19
|
+
get currentHour(): number;
|
|
20
|
+
set currentHour(value: number | undefined);
|
|
21
|
+
/**
|
|
22
|
+
* Get the current day
|
|
23
|
+
*/
|
|
24
|
+
get currentDay(): number;
|
|
25
|
+
set currentDay(value: number | undefined);
|
|
26
|
+
/**
|
|
27
|
+
* If the current day is greater than or equal to the weekend start day, then it will return true.
|
|
28
|
+
*/
|
|
29
|
+
get isWeekend(): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Get the current week day number (1 - {@link weekLength}).
|
|
32
|
+
* For example, if the week length is 7 and the current day is 10, then the result will be 4.
|
|
33
|
+
*/
|
|
34
|
+
get currentWeekDayNumber(): number;
|
|
35
|
+
/**
|
|
36
|
+
* Get the current week day name. If the week days names are not defined, then it will return undefined.
|
|
37
|
+
* For example, if the week days names are ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'] and the current day is 10, then the result will be 'Thursday'.
|
|
38
|
+
* @default ""
|
|
39
|
+
*/
|
|
40
|
+
get currentDayName(): string;
|
|
41
|
+
/**
|
|
42
|
+
* Get the current {@link timeSlots} index.
|
|
43
|
+
* You can use this property to create "Image that changes based on the time period":
|
|
44
|
+
* @example
|
|
45
|
+
* ```tsx
|
|
46
|
+
* import { weekLength } from '@drincs/nqtr';
|
|
47
|
+
*
|
|
48
|
+
* function changeBackground() {
|
|
49
|
+
* return (
|
|
50
|
+
* <img src={`background-currentTimeSlot.currentTimeSlot.png`} />
|
|
51
|
+
* )
|
|
52
|
+
* }
|
|
53
|
+
*/
|
|
54
|
+
get currentTimeSlot(): number;
|
|
55
|
+
/**
|
|
56
|
+
* This function will increase the current hour by the given time spent.
|
|
57
|
+
* If the new hour is greater than or equal to the max day hours, then it will increase the day and set the new hour.
|
|
58
|
+
* @param timeSpent is the time spent in hours (default: {@link defaultTimeSpent})
|
|
59
|
+
* @returns currentTimeSlot.currentHour
|
|
60
|
+
*/
|
|
61
|
+
increaseHour(timeSpent?: number): number;
|
|
62
|
+
/**
|
|
63
|
+
* This function will increase the current day by the given days.
|
|
64
|
+
* @param newDayHour is the hour of the new day (default: {@link minDayHours})
|
|
65
|
+
* @param days is the number of days to increase (default: 1)
|
|
66
|
+
* @returns timeTracker.currentDay
|
|
67
|
+
*/
|
|
68
|
+
increaseDay(newDayHour?: number, days?: number): number;
|
|
69
|
+
/**
|
|
70
|
+
* This function will check if the current hour is between the given hours.
|
|
71
|
+
* @param fromHour the starting hour. If the {@link currentHour} is equal to this hour, the function will return true.
|
|
72
|
+
* @param toHour the ending hour.
|
|
73
|
+
* @returns true if the current hour is between the given hours, otherwise false.
|
|
74
|
+
*/
|
|
75
|
+
nowIsBetween(fromHour: number | undefined, toHour: number | undefined): boolean;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
declare class RoutineManager {
|
|
79
|
+
get fixedRoutine(): CommitmentInterface[];
|
|
80
|
+
/**
|
|
81
|
+
* Set a commitment as fixed, it will be always available. They cannot be deleted or edit during the game session.
|
|
82
|
+
*/
|
|
83
|
+
set fixedRoutine(commitments: CommitmentInterface[]);
|
|
84
|
+
/**
|
|
85
|
+
* Get the temporary commitments by its id.
|
|
86
|
+
* @returns The temporary commitments.
|
|
87
|
+
*/
|
|
88
|
+
get temporaryRoutine(): CommitmentInterface[];
|
|
89
|
+
get allRoutine(): CommitmentInterface[];
|
|
90
|
+
/**
|
|
91
|
+
* This feature adds the commitments during the game session.
|
|
92
|
+
* @param commitment The commitment or commitments to add.
|
|
93
|
+
*/
|
|
94
|
+
add(commitment: CommitmentInterface[] | CommitmentInterface): void;
|
|
95
|
+
/**
|
|
96
|
+
* Get the commitments added during the game session.
|
|
97
|
+
* @param id The id of the commitment.
|
|
98
|
+
* @returns The commitment or undefined if not found.
|
|
99
|
+
*/
|
|
100
|
+
find(id: string): CommitmentInterface | undefined;
|
|
101
|
+
/**
|
|
102
|
+
* Remove the commitments added during the game session.
|
|
103
|
+
* @param commitment The commitment or commitments to remove.
|
|
104
|
+
*/
|
|
105
|
+
remove(commitment: CommitmentInterface[] | CommitmentInterface): void;
|
|
106
|
+
/**
|
|
107
|
+
* Clear all the expired commitments.
|
|
108
|
+
*/
|
|
109
|
+
clearExpiredRoutine(): void;
|
|
110
|
+
/**
|
|
111
|
+
* Get the current commitments. The hidden commitments are not included.
|
|
112
|
+
* In case there is a character who has two or more commitments at the same time, will be selected the commitment with the highest priority.
|
|
113
|
+
* Higher priority commitments are calculated using the following steps:
|
|
114
|
+
* 1. The commitments that have Commitments BaseModel.priority set to a higher value will be selected first.
|
|
115
|
+
* 2. If there are commitments with the same priority, the commitments that are not fixed will be selected first.
|
|
116
|
+
* 3. If there are commitments with the same priority and the same fixed status, priority will be given to the commitment with a lower index.
|
|
117
|
+
* @returns The current commitments.
|
|
118
|
+
*/
|
|
119
|
+
get currentRoutine(): CommitmentInterface[];
|
|
120
|
+
get currentRoomRoutine(): CommitmentInterface[];
|
|
121
|
+
/**
|
|
122
|
+
* Get the character commitment.
|
|
123
|
+
* @param character The character.
|
|
124
|
+
* @returns The commitment or undefined if not found.
|
|
125
|
+
*/
|
|
126
|
+
getCommitmentByCharacter(character: CharacterInterface): CommitmentInterface | undefined;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
declare class QuestManager {
|
|
130
|
+
/**
|
|
131
|
+
* The quests registered in the game.
|
|
132
|
+
*/
|
|
133
|
+
get quests(): QuestInterface[];
|
|
134
|
+
/**
|
|
135
|
+
* The quests that are started, so they are in progress or completed or failed.
|
|
136
|
+
*/
|
|
137
|
+
get startedQuests(): QuestInterface[];
|
|
138
|
+
/**
|
|
139
|
+
* The quests that are in progress.
|
|
140
|
+
*/
|
|
141
|
+
get inProgressQuests(): QuestInterface[];
|
|
142
|
+
/**
|
|
143
|
+
* The quests that are completed.
|
|
144
|
+
*/
|
|
145
|
+
get completedQuests(): QuestInterface[];
|
|
146
|
+
/**
|
|
147
|
+
* The quests that are failed.
|
|
148
|
+
*/
|
|
149
|
+
get failedQuests(): QuestInterface[];
|
|
150
|
+
/**
|
|
151
|
+
* The quests that are not started.
|
|
152
|
+
*/
|
|
153
|
+
get notStartedQuests(): QuestInterface[];
|
|
154
|
+
/**
|
|
155
|
+
* Get the quest by the id.
|
|
156
|
+
* @param id The id of the quest.
|
|
157
|
+
* @returns The quest with the id.
|
|
158
|
+
*/
|
|
159
|
+
find(id: string): QuestInterface | undefined;
|
|
160
|
+
/**
|
|
161
|
+
* Start the quests that must start on the current stage.
|
|
162
|
+
*/
|
|
163
|
+
startsStageMustBeStarted(props: OnRunProps): Promise<void>;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
declare class NavigatorManager {
|
|
167
|
+
get rooms(): RoomInterface[];
|
|
168
|
+
get locations(): LocationInterface[];
|
|
169
|
+
get maps(): MapInterface[];
|
|
170
|
+
get currentRoomId(): string | undefined;
|
|
171
|
+
get currentRoom(): RoomInterface | undefined;
|
|
172
|
+
set currentRoom(room: RoomInterface | string);
|
|
173
|
+
get currentLocation(): LocationInterface | undefined;
|
|
174
|
+
get currentMap(): MapInterface | undefined;
|
|
175
|
+
/**
|
|
176
|
+
* Clear all the expired activities.
|
|
177
|
+
*/
|
|
178
|
+
clearExpiredActivities(): void;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
declare const timeTracker: TimeManager;
|
|
182
|
+
declare const navigator: NavigatorManager;
|
|
183
|
+
declare const routine: RoutineManager;
|
|
184
|
+
declare const questsNotebook: QuestManager;
|
|
185
|
+
|
|
186
|
+
export { NavigatorManager as N, QuestManager as Q, RoutineManager as R, TimeManager as T, navigator as n, questsNotebook as q, routine as r, timeTracker as t };
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var pixiVn=require('@drincs/pixi-vn');var be=Object.defineProperty;var Z=(o,e)=>{for(var t in e)be(o,t,{get:e[t],enumerable:true});};var ae={};Z(ae,{ActivityBaseModel:()=>$,ActivityStoredClass:()=>g,CommitmentBaseModel:()=>B,CommitmentStoredClass:()=>I,LocationBaseModel:()=>Y,LocationStoredClass:()=>x,MapBaseModel:()=>F,MapStoredClass:()=>b,QuestBaseModel:()=>z,QuestStoredClass:()=>_,RoomBaseModel:()=>V,RoomStoredClass:()=>R,StageBaseModel:()=>G,StageStoredClass:()=>T});var f="___nqtr-time_manager_data___",h="___nqtr-current_room_memory___",ee="___nqtr-last_event_memory___";var ie={};Z(ie,{navigator:()=>l,questsNotebook:()=>Ee,routine:()=>k,timeTracker:()=>c});var te={};Z(te,{RegisteredActivities:()=>C,RegisteredCommitments:()=>y,RegisteredLocations:()=>D,RegisteredMaps:()=>E,RegisteredQuests:()=>N,RegisteredRooms:()=>S});var u;(n=>(n.log=(i,...a)=>console.log(`[NQTR] ${i}`,...a),n.warn=(i,...a)=>console.warn(`[NQTR] ${i}`,...a),n.error=(i,...a)=>console.error(`[NQTR] ${i}`,...a),n.info=(i,...a)=>console.info(`[NQTR] ${i}`,...a)))(u||={});var K=new pixiVn.CachedMap({cacheSize:20}),oe;(n=>{function o(i){if(Array.isArray(i)){i.forEach(a=>n.add(a));return}K.set(i.id,i);}n.add=o;function e(i){try{let a=K.get(i);if(!a){console.warn(`[NQTR] Activity ${i} not found, you should register it first`);return}return a}catch(a){u.error(`Error while getting Activity ${i}`,a);return}}n.get=e;function t(){return Array.from(K.values())}n.values=t;function r(i){return K.has(i)}n.has=r;})(oe||={});var C=oe;var A=new pixiVn.CachedMap({cacheSize:20}),j=new pixiVn.CachedMap({cacheSize:20}),ue;(n=>{function o(i){if(Array.isArray(i)){i.forEach(a=>n.add(a));return}console.warn(`[NQTR] Registering commitment ${i.id}`,i),A.set(i.id,i);}n.add=o;function e(i){try{let a=A.get(i);if(!a){console.warn(`[NQTR] Commitment ${i} not found, you should register it first`);return}return a}catch(a){u.error(`Error while getting Commitment ${i}`,a);return}}n.get=e;function t(){return Array.from(A.values())}n.values=t;function r(i){return A.has(i)}n.has=r;})(ue||={});var y=ue;var P=new pixiVn.CachedMap({cacheSize:20}),de;(n=>{function o(i){if(Array.isArray(i)){i.forEach(a=>o(a));return}P.has(i.id)&&console.warn(`[NQTR] Location id ${i.id} already exists, it will be overwritten`),P.set(i.id,i);}n.add=o;function e(i){try{let a=P.get(i);if(!a){console.warn(`[NQTR] Location ${i} not found, you should register it first`);return}return a}catch(a){u.error(`Error while getting Location ${i}`,a);return}}n.get=e;function t(){return Array.from(P.values())}n.values=t;function r(i){return P.has(i)}n.has=r;})(de||={});var D=de;var Q=new pixiVn.CachedMap({cacheSize:20}),ce;(n=>{function o(i){if(Array.isArray(i)){i.forEach(a=>o(a));return}Q.has(i.id)&&console.warn(`[NQTR] Map id ${i.id} already exists, it will be overwritten`),Q.set(i.id,i);}n.add=o;function e(i){try{let a=Q.get(i);if(!a){console.warn(`[NQTR] Map ${i} not found, you should register it first`);return}return a}catch(a){u.error(`Error while getting Map ${i}`,a);return}}n.get=e;function t(){return Array.from(Q.values())}n.values=t;function r(i){return Q.has(i)}n.has=r;})(ce||={});var E=ce;var W=new pixiVn.CachedMap({cacheSize:5}),me;(n=>{function o(i){if(Array.isArray(i)){i.forEach(a=>n.add(a));return}W.set(i.id,i);}n.add=o;function e(i){try{let a=W.get(i);if(!a){console.warn(`[NQTR] Quest ${i} not found, you should register it first`);return}return a}catch(a){u.error(`Error while getting Quest ${i}`,a);return}}n.get=e;function t(){return Array.from(W.values())}n.values=t;function r(i){return W.has(i)}n.has=r;})(me||={});var N=me;var U=new pixiVn.CachedMap({cacheSize:20}),fe;(n=>{function o(i){if(Array.isArray(i)){i.forEach(m=>o(m));return}U.set(i.id,i);let a=i.location;D.add(a);let s=a?.map;s&&E.add(s);}n.add=o;function e(i){try{let a=U.get(i);if(!a){console.warn(`[NQTR] Room ${i} not found, you should register it first`);return}return a}catch(a){u.error(`Error while getting Room ${i}`,a);return}}n.get=e;function t(){return Array.from(U.values())}n.values=t;function r(i){return U.has(i)}n.has=r;})(fe||={});var S=fe;var M=class{get rooms(){return S.values()}get locations(){return D.values()}get maps(){return E.values()}get currentRoomId(){return pixiVn.storage.getVariable(h)}get currentRoom(){let e=this.currentRoomId;if(!e){u.error("The current room has not yet been set");return}let t=S.get(e);if(!t){u.error(`Current room ${e} not found`);return}return t}set currentRoom(e){if(typeof e!="string"&&(e=e.id),!S.get(e)){u.error(`The room ${e} is not registered, so it can't be set as current room`);return}let r=pixiVn.storage.getVariable(h);r!==e&&(O({type:"editroom",prev:r,value:e}),pixiVn.storage.setVariable(h,e));}get currentLocation(){return this.currentRoom?.location}get currentMap(){return this.currentRoom?.location.map}clearExpiredActivities(){S.values().forEach(e=>{e.clearExpiredActivities();});}};var H=class{get quests(){return N.values()}get startedQuests(){return this.quests.filter(e=>e.started)}get inProgressQuests(){return this.quests.filter(e=>e.inProgress)}get completedQuests(){return this.quests.filter(e=>e.completed)}get failedQuests(){return this.quests.filter(e=>e.failed)}get notStartedQuests(){return this.quests.filter(e=>!e.started)}find(e){return N.get(e)}async startsStageMustBeStarted(e){let t=this.quests.map(r=>r.currentStageMustStart?r.startCurrentStage(e):Promise.resolve());await Promise.all(t);}};var X="___nqtr-temporary_commitment___",q=class{get fixedRoutine(){return [...j.values()]}set fixedRoutine(e){e.forEach(t=>{j.has(t.id)&&console.warn(`[NQTR] Commitment id ${t.id} already exists, it will be overwritten`),j.set(t.id,t);});}get temporaryRoutine(){let e=pixiVn.storage.getVariable(X);return e?e.map(r=>y.get(r)).filter(r=>r!==void 0):[]}get allRoutine(){return [...this.fixedRoutine,...this.temporaryRoutine]}add(e){Array.isArray(e)||(e=[e]);let t=e.map(r=>{if(!y.get(r.id)){console.warn(`[NQTR] Commitment ${r.id} not found, it will be ignored`);return}return r.id}).filter(r=>r!==void 0);pixiVn.storage.setVariable(X,t);}find(e){return y.get(e)}remove(e){Array.isArray(e)||(e=[e]);let t=e.map(n=>n.id),r=pixiVn.storage.getVariable(X);r&&(r=r.filter(n=>!t.includes(n)),pixiVn.storage.setVariable(X,r));}clearExpiredRoutine(){y.values().forEach(e=>{e.expired&&A.delete(e.id);});}get currentRoutine(){let e={};return [...this.fixedRoutine,...this.temporaryRoutine].forEach(t=>{t.isActive&&(t.characters.length>0?t.characters.every(n=>!e[n.id]||t.priority>e[n.id].priority)&&t.characters.forEach(n=>{e[n.id]=t;}):u.error(`The commitment ${t.id} has no characters assigned`));}),Object.values(e)}get currentRoomRoutine(){return l.currentRoom?.routine||[]}getCommitmentByCharacter(e){this.currentRoutine.forEach(t=>{if(t.characters.map(r=>r.id).includes(e.id))return t});}};var d=class{static minDayHours=0;static maxDayHours=24;static defaultTimeSpent=1;static timeSlots=[];static weekLength=7;static weekendStartDay=this.weekLength-1;static weekDaysNames=[]};var L=class{initialize(e){let{minDayHours:t=0,maxDayHours:r=24,defaultTimeSpent:n=1,timeSlots:i=[],weekLength:a=7,weekendStartDay:s=a-1,weekDaysNames:m=[]}=e;d.minDayHours=t,d.maxDayHours=r,d.defaultTimeSpent=n,d.timeSlots=i,d.weekLength=a,s>=d.weekLength?console.warn(`[NQTR] Weekend start day should be less than week length ${a}, so will be ignored`):d.weekendStartDay=s,m.length!==a?console.warn(`[NQTR] Week days names should be equal to week length ${a}, so will be ignored`):d.weekDaysNames=m;}get minDayHours(){return d.minDayHours}get maxDayHours(){return d.maxDayHours}get defaultTimeSpent(){return d.defaultTimeSpent}get timeSlots(){return d.timeSlots}get weekLength(){return d.weekLength}get weekendStartDay(){return d.weekendStartDay}get weekDaysNames(){return d.weekDaysNames}get currentHour(){let e=pixiVn.storage.getVariable(f)||{};return e.hasOwnProperty("currentHour")&&typeof e.currentHour=="number"?e.currentHour:this.minDayHours}set currentHour(e){let t=pixiVn.storage.getVariable(f)||{},r={...t};typeof e=="number"?r.currentHour=e:delete r.currentHour,O({type:"edittime",prev:t,value:r}),pixiVn.storage.setVariable(f,r);}get currentDay(){let e=pixiVn.storage.getVariable(f)||{};return e.hasOwnProperty("currentDay")&&typeof e.currentDay=="number"?e.currentDay:0}set currentDay(e){let t=pixiVn.storage.getVariable(f)||{},r={...t};typeof e=="number"?r.currentDay=e:delete r.currentDay,O({type:"edittime",prev:t,value:r}),pixiVn.storage.setVariable(f,r);}get isWeekend(){return this.currentWeekDayNumber>=this.weekendStartDay}get currentWeekDayNumber(){return this.currentDay%this.weekLength+1}get currentDayName(){let e=this.currentWeekDayNumber-1;return e>=this.weekDaysNames.length?(console.warn(`[NQTR] Week day name is not defined for day ${e}`,this.weekDaysNames),""):this.weekDaysNames[e]}get currentTimeSlot(){if(this.timeSlots.length===0)return console.warn("[NQTR] Time slots are not defined"),0;for(let e=0;e<this.timeSlots.length;e++){let t=this.timeSlots[e];if(this.timeSlots.length>e+1&&this.nowIsBetween(t.startHour,this.timeSlots[e+1].startHour))return e}return this.timeSlots.length-1}increaseHour(e=this.defaultTimeSpent){let t=this.currentHour+e;return t>=this.maxDayHours&&(this.increaseDay(),t=this.minDayHours+(t-this.maxDayHours)),this.currentHour=t,this.currentHour}increaseDay(e=this.minDayHours,t=1){let r=this.currentDay+t;return this.currentDay=r,this.currentHour=e,this.currentDay}nowIsBetween(e,t){e===void 0&&(e=this.minDayHours-1),t===void 0&&(t=this.maxDayHours+1);let r=this.currentHour;return e<t?r>=e&&r<t:r>=e||r<t}};var c=new L,l=new M,k=new q,Ee=new H;function O(o){pixiVn.storage.setVariable(ee,o);}function we(){return pixiVn.storage.getVariable(ee)}function le(){let o=we(),e=l.currentRoom;if(!e||!e.automaticFunction){pixiVn.narration.addCurrentStepToHistory();return}switch(o?.type){case "editroom":pixiVn.storage.setVariable(h,o.prev),pixiVn.narration.addCurrentStepToHistory(),pixiVn.storage.setVariable(h,e.id);break;case "edittime":let t=pixiVn.storage.getVariable(f)||{};pixiVn.storage.setVariable(f,o.prev),pixiVn.narration.addCurrentStepToHistory(),pixiVn.storage.setVariable(f,t);break}}var Pe="__nqtr-activity__",g=class extends pixiVn.StoredClassModel{constructor(t,r,n,i=Pe){super(i,t);this._onRun=r;this._fromHour=n.fromHour,this._toHour=n.toHour,this._fromDay=n.fromDay,this._toDay=n.toDay;}_fromHour;get fromHour(){return this._fromHour}_toHour;get toHour(){return this._toHour}_fromDay;get fromDay(){return this._fromDay}_toDay;get toDay(){return this._toDay}get run(){return async t=>(le(),await this._onRun(this,t))}get expired(){return !!(this.toDay&&this.toDay<=c.currentDay)}get isActive(){return !(this.fromDay&&this.fromDay>c.currentDay||this.toDay&&this.toDay<c.currentDay||!c.nowIsBetween(this.fromHour,this.toHour))}};var $=class extends g{constructor(e,t,r){super(e,t,{fromHour:r.fromHour,toHour:r.toHour,fromDay:r.fromDay,toDay:r.toDay}),this.defaultName=r.name||"",this.defaultDisabled=r.disabled||false,this.defaultHidden=r.hidden||false,this._icon=r.renderIcon;}defaultName;get name(){return this.getStorageProperty("name")||this.defaultName}set name(e){this.setStorageProperty("name",e);}defaultDisabled;get disabled(){let e=this.getStorageProperty("disabled")||this.defaultDisabled;return typeof e=="string"?pixiVn.storage.getFlag(e):e}set disabled(e){this.setStorageProperty("disabled",e);}defaultHidden;get hidden(){let e=this.getStorageProperty("hidden")||this.defaultHidden;return typeof e=="string"?pixiVn.storage.getFlag(e):e}set hidden(e){this.setStorageProperty("hidden",e);}_icon;get icon(){return this._icon}};var Qe="__nqtr-commitment__",I=class extends g{constructor(t,r,n,i,a){i=i||(()=>{});super(t,i,a,Qe);this._characters=r;this._room=n;this.defaultExecutionType=a.executionType||"interaction",this.defaultPriority=a.priority;}defaultExecutionType;defaultPriority;get characters(){return this._characters}get room(){return this._room}get executionType(){return this.getStorageProperty("executionType")||this.defaultExecutionType}set executionType(t){this.setStorageProperty("executionType",t);}get priority(){return this.getStorageProperty("priority")||this.defaultPriority||0}set priority(t){this.setStorageProperty("priority",t);}};var B=class extends I{constructor(e,t,r,n){super(e,t?Array.isArray(t)?t:[t]:[],r,n.onRun,{executionType:n.executionType,priority:n.priority,fromHour:n.fromHour,toHour:n.toHour,fromDay:n.fromDay,toDay:n.toDay}),this._name=n.name||"",this._image=n.image,this.defaultDisabled=n.disabled||false,this.defaultHidden=n.hidden||false,this._icon=n.icon;}_name;get name(){return this._name}_image;get image(){return this._image}_icon;get icon(){return this._icon}defaultDisabled;get disabled(){let e=this.getStorageProperty("disabled")||this.defaultDisabled;return typeof e=="string"?pixiVn.storage.getFlag(e):e}set disabled(e){this.setStorageProperty("disabled",e);}defaultHidden;get hidden(){if(this.fromDay&&this.fromDay>c.currentDay||!c.nowIsBetween(this.fromHour,this.toHour)||!this.expired)return true;let e=this.getStorageProperty("hidden")||this.defaultHidden;return typeof e=="string"?pixiVn.storage.getFlag(e):e}set hidden(e){this.setStorageProperty("hidden",e);}};var p=class extends pixiVn.StoredClassModel{constructor(t,r,n=[]){super(t,r);this.defaultActivities=n;}get defaultActivitiesIds(){return this.defaultActivities.map(t=>t.id)}get activeActivityScheduling(){return this.getStorageProperty("activeActivityScheduling")||{}}get excludedActivitiesScheduling(){return this.getStorageProperty("excludedActivitiesScheduling")||{}}removeActivityScheduling(t){let r=this.activeActivityScheduling;delete r[t],this.setStorageProperty("activeActivityScheduling",r);let n=this.excludedActivitiesScheduling;delete n[t],this.setStorageProperty("excludedActivitiesScheduling",n);}editActivityScheduling(t,r){this.removeActivityScheduling(t);let n=this.activeActivityScheduling;n[t]=r,this.setStorageProperty("activeActivityScheduling",n);}editExcludedActivityScheduling(t,r){this.removeActivityScheduling(t);let n=this.excludedActivitiesScheduling;n[t]=r,this.setStorageProperty("excludedActivitiesScheduling",n);}get additionalActivitiesIds(){return this.getStorageProperty("additionalActivitiesIds")||[]}get excludedActivitiesIds(){return this.getStorageProperty("excludedActivitiesIds")||[]}addActivity(t,r={}){let{hours:n,fromDay:i,toDay:a}=r,s={};if(n){if(n.from>=n.to)throw new Error("[NQTR] The from hour must be less than the to hour.");s.fromHour=n.from;}if(i===0&&console.warn("[NQTR] The from day must be greater than 0, so it will be ignored."),a===0&&console.warn("[NQTR] The to day must be greater than 0, so it will be ignored."),i&&a&&i>=a)throw new Error("[NQTR] The from day must be less than the to day.");if(i&&(s.fromDay=i),a&&(s.toDay=a),this.defaultActivitiesIds.includes(t.id)){console.warn(`[NQTR] Activity with id ${t.id} already exists, so it will be ignored.`);return}let m=this.additionalActivitiesIds;if(m.includes(t.id)){if(Object.keys(s).length){this.editActivityScheduling(t.id,s);return}else if(this.excludedActivitiesIds.includes(t.id)){this.removeActivityScheduling(t.id),console.log(`[NQTR] Activity with id ${t.id} was excluded, so it will be associated with this class again.`);return}console.warn(`[NQTR] Activity with id ${t.id} already exists, so it will be ignored.`);return}m.push(t.id),this.setStorageProperty("additionalActivitiesIds",m),Object.keys(s).length&&this.editActivityScheduling(t.id,s);}removeActivity(t,r={}){let{toDay:n}=r,i={};n===0&&console.warn("[NQTR] The to day must be greater than 0, so it will be ignored."),n&&(i.toDay=n);let a=this.additionalActivitiesIds;if(a.includes(t.id)){if(Object.keys(i).length){this.editExcludedActivityScheduling(t.id,i);return}a=a.filter(s=>s!==t.id),this.setStorageProperty("additionalActivitiesIds",a);}else if(this.defaultActivitiesIds.includes(t.id)){if(Object.keys(i).length){this.editExcludedActivityScheduling(t.id,i);return}let s=this.excludedActivitiesIds;s.push(t.id),this.setStorageProperty("excludedActivitiesIds",s);}else console.warn(`[NQTR] Activity with id ${t.id} not found, so it will be ignored.`);}clearExpiredActivities(){let t=this.activeActivityScheduling,r=this.excludedActivitiesScheduling,n=this.additionalActivitiesIds,i=this.excludedActivitiesIds;n.forEach(a=>{if(a in t){let{toDay:s}=t[a];s&&s<c.currentDay&&(this.removeActivityScheduling(a),n=n.filter(m=>m!==a));}}),i.forEach(a=>{if(a in r){let{toDay:s}=r[a];s&&s<c.currentDay&&(this.removeActivityScheduling(a),i=i.filter(m=>m!==a));}});}get activities(){let t=[];return Object.entries(this.activeActivityScheduling).forEach(([r,n])=>{let i=C.get(r),{fromDay:a=i?.fromDay,fromHour:s=i?.fromHour,toDay:m=i?.toDay,toHour:xe=i?.toHour}=n;i&&c.nowIsBetween(s,xe)&&!(a&&a>c.currentDay)&&!(m&&m<c.currentDay)&&t.push(i);}),Object.entries(this.excludedActivitiesScheduling).forEach(([r,n])=>{let i=C.get(r);i&&i.isActive&&!(n.toDay&&n.toDay>=c.currentDay)&&t.push(i);}),this.defaultActivities.forEach(r=>{r.isActive&&!t.find(n=>n.id===r.id)&&t.push(r);}),t}};var Me="__nqtr-location__",x=class extends p{constructor(t,r,n=[]){super(Me,t,n);this._map=r;}get map(){return this._map}get rooms(){return l.rooms.filter(t=>t.location.id===this.id)}};var Y=class extends x{constructor(e,t,r={}){super(e,t,r.activities||[]),this.defaultName=r.name||"",this.defaultDisabled=r.disabled||false,this.defaultHidden=r.hidden||false,this._icon=r.icon;}defaultName;get name(){return this.getStorageProperty("name")||this.defaultName}set name(e){this.setStorageProperty("name",e);}defaultDisabled;get disabled(){let e=this.getStorageProperty("disabled")||this.defaultDisabled;return typeof e=="string"?pixiVn.storage.getFlag(e):e}set disabled(e){this.setStorageProperty("disabled",e);}defaultHidden;get hidden(){let e=this.getStorageProperty("hidden")||this.defaultHidden;return typeof e=="string"?pixiVn.storage.getFlag(e):e}set hidden(e){this.setStorageProperty("hidden",e);}_icon;get icon(){return this._icon}};var Oe="__nqtr-map__",b=class extends p{constructor(e,t=[]){super(Oe,e,t);}get locations(){return l.locations.filter(e=>e.map.id===this.id)}};var F=class extends b{constructor(e,t={}){super(e,t.activities||[]),this.defaultName=t.name||"",this._image=t.image;}defaultName;get name(){return this.getStorageProperty("name")||this.defaultName}set name(e){this.setStorageProperty("name",e);}_image;get image(){return this._image}};var He="__nqtr-room__",R=class extends p{constructor(t,r,n=[]){super(He,t,n);this._location=r;}get routine(){return k.currentRoutine.filter(t=>t.room.id===this.id)}get location(){return this._location}get characters(){let t=[];return this.routine.forEach(r=>{t.push(...r.characters);}),t}get automaticFunction(){let t=this.routine.find(r=>r.executionType==="automatic")?.run;if(t)return async r=>{await t(r);}}};var V=class extends R{constructor(e,t,r={}){super(e,t,r.activities||[]),this.defaultName=r.name||"",this._image=r.image,this.defaultDisabled=r.disabled||false,this.defaultHidden=r.hidden||false,this._icon=r.icon;}defaultName;get name(){return this.getStorageProperty("name")||this.defaultName}set name(e){this.setStorageProperty("name",e);}_image;get image(){return this._image}defaultDisabled;get disabled(){let e=this.getStorageProperty("disabled")||this.defaultDisabled;return typeof e=="string"?pixiVn.storage.getFlag(e):e}set disabled(e){this.setStorageProperty("disabled",e);}defaultHidden;get hidden(){let e=this.getStorageProperty("hidden")||this.defaultHidden;return typeof e=="string"?pixiVn.storage.getFlag(e):e}set hidden(e){this.setStorageProperty("hidden",e);}_icon;get icon(){return this._icon}get routine(){return k.currentRoutine.filter(e=>e.room.id===this.id)}};var Le="__nqtr-quest__",_=class extends pixiVn.StoredClassModel{constructor(t,r,n={}){super(Le,t);this._stages=r;this._onStart=n.onStart,this._onNextStage=n.onNextStage;}get stages(){return this._stages}get currentStageIndex(){return this.getStorageProperty("currentStageIndex")}set currentStageIndex(t){this.setStorageProperty("currentStageIndex",t);}get currentStage(){let t=this.currentStageIndex;if(!(t===void 0||t>=this.stages.length))return this.stages[t]}get started(){return this.currentStageIndex!==void 0}get completed(){return this.currentStageIndex===void 0?false:this.currentStageIndex>this.stages.length-1}get inProgress(){return this.completed||this.failed?false:this.started}get failed(){return this.getStorageProperty("failed")||false}set failed(t){this.setStorageProperty("failed",t);}_onStart;get onStart(){return this._onStart}_onNextStage;get onNextStage(){return this._onNextStage}async start(t){if(this.started){console.warn(`[NQTR] Quest ${this.id} is already started`);return}if(this.stages.length===0){u.error(`Quest ${this.id} has no stages`);return}this.currentStageIndex=0;let r=this.currentStage;if(r&&r.start)return this.onStart&&await this.onStart(this,t),await r.start(t);u.error(`Quest ${this.id} has no start stage`);}async tryToGoNextStage(t){if(!this.inProgress)return false;let r=this.currentStage;return r?r.completed?await this.goNextStage(t):false:(u.error(`Quest ${this.id} has no current stage`),false)}async completeCurrentStageAndGoNext(t){let r=this.currentStage;return r?(r.completed=true,await this.goNextStage(t)):(u.error(`Quest ${this.id} has no current stage`),false)}async goNextStage(t){if(!this.inProgress)return console.warn(`[NQTR] Quest ${this.id} is not in progress`),false;let r=this.currentStage,n=this.currentStageIndex;if(!r||n===void 0)return u.error(`Quest ${this.id} has no current stage`),false;this.currentStageIndex=n+1,this.onNextStage&&await this.onNextStage(this,t),r&&r.onEnd&&await r.onEnd(r,t);let i=this.currentStage;return i&&(i.inizialize(),this.currentStageMustStart&&await this.startCurrentStage(t)),true}get currentStageMustStart(){let t=this.currentStage;return t?!t.started&&t.canStart&&!t.completed:false}async startCurrentStage(t){let r=this.currentStage;r&&this.currentStageMustStart?await r.start(t):console.warn(`[NQTR] Quest ${this.id} can't start the current stage`);}};var z=class extends _{constructor(e,t,r){super(e,t,{onStart:r.onStart,onNextStage:r.onNextStage}),this._name=r.name||"",this._description=r.description||"",this._icon=r.icon,this._image=r.image,this._inDevelopment=r.inDevelopment||false;}_name;get name(){return this._name}_description;get description(){return this._description}_icon;get icon(){return this._icon}_image;get image(){return this._image}_inDevelopment;get inDevelopment(){return this._inDevelopment}};var $e="__nqtr-stage__",T=class extends pixiVn.StoredClassModel{constructor(e,t={}){super($e,e),this._onStart=t.onStart,this._onEnd=t.onEnd,this._daysRequiredToStart=t.daysRequiredToStart,this._questsRequiredToStart=t.questsRequiredToStart||[];}_onStart;get onStart(){return this._onStart}_onEnd;get onEnd(){return this._onEnd}get completed(){return this.getStorageProperty("completed")||false}set completed(e){this.setStorageProperty("completed",e);}get started(){return this.getStorageProperty("started")||false}set started(e){this.setStorageProperty("started",e);}get prevStageEndDay(){return this.getStorageProperty("prevStageEndDay")}set prevStageEndDay(e){this.setStorageProperty("prevStageEndDay",e);}get startDay(){let e=this.prevStageEndDay;if(e!==void 0)return e+this.daysRequiredToStart}get canStart(){let e=this.daysRequiredToStart;if(e>0){let t=this.prevStageEndDay;if(t===void 0||t+e>c.currentDay)return false}return !(this.questsRequiredToStart.length>0&&!this.questsRequiredToStart.every(t=>t.quest.currentStageIndex&&t.quest.currentStageIndex>=t.stageNumber))}inizialize(){this.daysRequiredToStart>0&&(this.prevStageEndDay=c.currentDay,console.log(`[NQTR] Stage ${this.id} will start on day ${this.startDay}`));}async start(e){this.canStart?(this.started=true,this.onStart&&await this.onStart(this,e)):console.warn(`[NQTR] Stage ${this.id} can't start`);}_daysRequiredToStart;get daysRequiredToStart(){return this._daysRequiredToStart||0}_questsRequiredToStart;get questsRequiredToStart(){return this._questsRequiredToStart||[]}};var G=class extends T{constructor(e,t){super(e,{onStart:t.onStart,onEnd:t.onEnd,daysRequiredToStart:t.daysRequiredToStart,questsRequiredToStart:t.questsRequiredToStart}),this._name=t.name||"",this._flags=t.flags||[],this._description=t.description||"",this._adviceDescription=t.adviceDescription||"",this._image=t.image,this._flagsRequiredToStart=t.flagsRequiredToStart||[],this._requestDescriptionToStart=t.requestDescriptionToStart||"";}_name;get name(){return this._name}_description;get description(){return this._description}_adviceDescription;get adviceDescription(){return this._adviceDescription}_image;get image(){return this._image}_flags;get flags(){return this._flags}_flagsRequiredToStart;get flagsRequiredToStart(){return this._flagsRequiredToStart}_requestDescriptionToStart;get requestDescriptionToStart(){return this._requestDescriptionToStart}get completed(){return super.completed?true:this.flags.length>0?!!this.flags.every(e=>pixiVn.storage.getFlag(e.flag)):false}set completed(e){super.completed=e;}get canStart(){return this.flagsRequiredToStart.length>0&&!this.flagsRequiredToStart.every(e=>pixiVn.storage.getFlag(e.flag))?false:super.canStart}};var ve={};var Ie={};var Be={...ae,...te,...ve,...ie,...Ie},Xr=Be;exports.ActivityBaseModel=$;exports.ActivityStoredClass=g;exports.CommitmentBaseModel=B;exports.CommitmentStoredClass=I;exports.LocationBaseModel=Y;exports.LocationStoredClass=x;exports.MapBaseModel=F;exports.MapStoredClass=b;exports.QuestBaseModel=z;exports.QuestStoredClass=_;exports.RegisteredActivities=C;exports.RegisteredCommitments=y;exports.RegisteredLocations=D;exports.RegisteredMaps=E;exports.RegisteredQuests=N;exports.RegisteredRooms=S;exports.RoomBaseModel=V;exports.RoomStoredClass=R;exports.StageBaseModel=G;exports.StageStoredClass=T;exports.default=Xr;exports.navigator=l;exports.questsNotebook=Ee;exports.routine=k;exports.timeTracker=c;//# sourceMappingURL=index.cjs.map
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|