@drincs/nqtr 0.3.7 → 0.4.0
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 +108 -9
- package/dist/decorators/index.d.ts +108 -9
- package/dist/decorators/index.mjs +1 -1
- package/dist/decorators/index.mjs.map +1 -1
- package/dist/index-B8-yQhYT.d.ts +188 -0
- package/dist/index-CJubtUni.d.mts +301 -0
- package/dist/index-Cq_kqDbo.d.ts +301 -0
- package/dist/index-knrOEAIO.d.mts +188 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +14 -46
- package/dist/index.d.ts +14 -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
package/dist/classes/index.d.ts
CHANGED
|
@@ -1,31 +1,508 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
import { A as ActivityInterface, a as ActivityBaseInternalInterface, C as CommitmentInterface, b as CommitmentBaseInternalInterface, R as RoomInterface, N as NavigationAbstractInterface, c as LocationInternalInterface, M as MapInterface, d as MapBaseInternalInterface, L as LocationInterface, e as RoomBaseInternalInterface } from '../RoomInterface-Cwm08AzD.js';
|
|
2
|
+
import { A as ActivityProps, C as CommitmentProps, L as LocationBaseModelProps, M as MapBaseModelProps, R as RoomBaseModelProps, Q as QuestProps, S as StageProps, a as StageFlags } from '../index-Cq_kqDbo.js';
|
|
3
|
+
import { a as OnRunEvent, O as OnRunAsyncFunction, E as ExecutionType, e as QuestBaseInternalInterface, S as StageInterface, Q as QuestInterface, f as StageBaseInternalInterface, d as QuestsRequiredType } from '../StageInterface-LDgQToad.js';
|
|
4
|
+
import { StoredClassModel, CharacterInterface } from '@drincs/pixi-vn';
|
|
5
|
+
import { OnRunProps } from '@drincs/nqtr';
|
|
6
|
+
|
|
7
|
+
declare class ActivityStoredClass<OnRunEventType = ActivityInterface> extends StoredClassModel implements ActivityBaseInternalInterface {
|
|
8
|
+
private readonly _onRun;
|
|
9
|
+
constructor(id: string, _onRun: OnRunEvent<OnRunEventType>, props: {
|
|
10
|
+
fromHour?: number;
|
|
11
|
+
toHour?: number;
|
|
12
|
+
fromDay?: number;
|
|
13
|
+
toDay?: number;
|
|
14
|
+
}, category?: string);
|
|
15
|
+
private _fromHour?;
|
|
16
|
+
get fromHour(): number | undefined;
|
|
17
|
+
private _toHour?;
|
|
18
|
+
get toHour(): number | undefined;
|
|
19
|
+
private _fromDay?;
|
|
20
|
+
get fromDay(): number | undefined;
|
|
21
|
+
private _toDay?;
|
|
22
|
+
get toDay(): number | undefined;
|
|
23
|
+
get run(): OnRunAsyncFunction;
|
|
24
|
+
get expired(): boolean;
|
|
25
|
+
get isActive(): boolean;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The activity model. It is used to create an activity.
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* export const nap = new ActivityModel("nap",
|
|
33
|
+
* (_, event) => {
|
|
34
|
+
* if (event) {
|
|
35
|
+
* event.navigate("/game")
|
|
36
|
+
* callLabelWithGoNavigationCallBack(napLabel, event)
|
|
37
|
+
* }
|
|
38
|
+
* else {
|
|
39
|
+
* console.error("Event is undefined")
|
|
40
|
+
* }
|
|
41
|
+
* },
|
|
42
|
+
* {
|
|
43
|
+
* name: "Nap",
|
|
44
|
+
* fromHour: 5,
|
|
45
|
+
* toHour: 23,
|
|
46
|
+
* icon: "https://icon.jpg",
|
|
47
|
+
* }
|
|
48
|
+
* )
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
declare class ActivityBaseModel extends ActivityStoredClass<ActivityInterface> {
|
|
52
|
+
/**
|
|
53
|
+
* @param id The activity id, that must be unique.
|
|
54
|
+
* @param onRun The function that is called when the activity is runned. Have 2 parameters: the runned activity and the yourParams object, that is an object with the parameters that you want to pass to the onRun function.
|
|
55
|
+
* @param props The activity properties.
|
|
56
|
+
*/
|
|
57
|
+
constructor(id: string, onRun: OnRunEvent<ActivityInterface>, props: ActivityProps);
|
|
58
|
+
private defaultName;
|
|
59
|
+
/**
|
|
60
|
+
* The name of the activity.
|
|
61
|
+
*/
|
|
62
|
+
get name(): string;
|
|
63
|
+
set name(value: string | undefined);
|
|
64
|
+
private defaultDisabled;
|
|
65
|
+
/**
|
|
66
|
+
* Whether is disabled. If it is a string, it is a Pixi'VN flag name.
|
|
67
|
+
*/
|
|
68
|
+
get disabled(): boolean;
|
|
69
|
+
set disabled(value: boolean | string);
|
|
70
|
+
private defaultHidden;
|
|
71
|
+
/**
|
|
72
|
+
* Whether is hidden. If it is a string, it is a Pixi'VN flag name.
|
|
73
|
+
*/
|
|
74
|
+
get hidden(): boolean;
|
|
75
|
+
set hidden(value: boolean | string);
|
|
76
|
+
private _icon?;
|
|
77
|
+
/**
|
|
78
|
+
* The icon of the activity.
|
|
79
|
+
*/
|
|
80
|
+
get icon(): string | undefined;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
declare class CommitmentStoredClass extends ActivityStoredClass<CommitmentInterface> implements CommitmentBaseInternalInterface {
|
|
84
|
+
private readonly _characters;
|
|
85
|
+
private readonly _room;
|
|
86
|
+
constructor(id: string, _characters: CharacterInterface[], _room: RoomInterface, onRun: OnRunEvent<CommitmentInterface> | undefined, props: {
|
|
87
|
+
executionType?: ExecutionType;
|
|
88
|
+
priority?: number;
|
|
89
|
+
fromHour?: number;
|
|
90
|
+
toHour?: number;
|
|
91
|
+
fromDay?: number;
|
|
92
|
+
toDay?: number;
|
|
93
|
+
});
|
|
94
|
+
private readonly defaultExecutionType;
|
|
95
|
+
private readonly defaultPriority?;
|
|
96
|
+
get characters(): CharacterInterface[];
|
|
97
|
+
get room(): RoomInterface;
|
|
98
|
+
get executionType(): ExecutionType;
|
|
99
|
+
set executionType(value: ExecutionType);
|
|
100
|
+
get priority(): number;
|
|
101
|
+
set priority(value: number);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The base model of a commitment. I suggest you extend this class to create your own commitment model.
|
|
106
|
+
* You must use the saveRoom function to save the commitment in the registered commitments.
|
|
107
|
+
* @example
|
|
108
|
+
* ```ts
|
|
109
|
+
* export const mcRoom = new CommitmentBaseModel("test", character, room, {
|
|
110
|
+
* name: "Test",
|
|
111
|
+
* image: "https://image.jpg",
|
|
112
|
+
* executionType: ExecutionTypeEnum.INTERACTION,
|
|
113
|
+
* onRun: (commitment) => {
|
|
114
|
+
* // Do something
|
|
115
|
+
* }
|
|
116
|
+
* })
|
|
117
|
+
* saveCommitment(mcRoom)
|
|
118
|
+
* ```
|
|
119
|
+
*/
|
|
120
|
+
declare class CommitmentBaseModel extends CommitmentStoredClass {
|
|
121
|
+
/**
|
|
122
|
+
* @param id The id of the commitment, it must be unique.
|
|
123
|
+
* @param character The character or characters that are in the commitment and so in the room.
|
|
124
|
+
* @param room The room where the commitment is.
|
|
125
|
+
* @param props The properties of the commitment.
|
|
126
|
+
*/
|
|
127
|
+
constructor(id: string, character: CharacterInterface | CharacterInterface[] | undefined, room: RoomInterface, props: CommitmentProps);
|
|
128
|
+
private _name;
|
|
129
|
+
/**
|
|
130
|
+
* The name of the commitment.
|
|
131
|
+
*/
|
|
132
|
+
get name(): string;
|
|
133
|
+
private _image?;
|
|
134
|
+
/**
|
|
135
|
+
* The image of the commitment.
|
|
136
|
+
*/
|
|
137
|
+
get image(): string | undefined;
|
|
138
|
+
private _icon?;
|
|
139
|
+
/**
|
|
140
|
+
* The icon of the commitment.
|
|
141
|
+
*/
|
|
142
|
+
get icon(): string | undefined;
|
|
143
|
+
private defaultDisabled;
|
|
144
|
+
/**
|
|
145
|
+
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
146
|
+
*/
|
|
147
|
+
get disabled(): boolean;
|
|
148
|
+
set disabled(value: boolean | string);
|
|
149
|
+
private defaultHidden;
|
|
150
|
+
/**
|
|
151
|
+
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
152
|
+
*/
|
|
153
|
+
get hidden(): boolean;
|
|
154
|
+
set hidden(value: boolean | string);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
declare abstract class NavigationAbstractClass extends StoredClassModel implements NavigationAbstractInterface {
|
|
158
|
+
private defaultActivities;
|
|
159
|
+
constructor(categoryId: string, id: string, defaultActivities?: ActivityInterface[]);
|
|
160
|
+
private get defaultActivitiesIds();
|
|
161
|
+
private get activeActivityScheduling();
|
|
162
|
+
private get excludedActivitiesScheduling();
|
|
163
|
+
private removeActivityScheduling;
|
|
164
|
+
private editActivityScheduling;
|
|
165
|
+
private editExcludedActivityScheduling;
|
|
166
|
+
private get additionalActivitiesIds();
|
|
167
|
+
private get excludedActivitiesIds();
|
|
168
|
+
addActivity(activity: ActivityInterface, options?: {
|
|
169
|
+
/**
|
|
170
|
+
* the activity will be associated with this class only for the specified hours.
|
|
171
|
+
* If you set from 3 and to 5, the activity will be associated with this class only for hours 3, 4 and 5. soSo at 2 or 6 it will not be associated with this class.
|
|
172
|
+
*/
|
|
173
|
+
hours?: {
|
|
174
|
+
from: number;
|
|
175
|
+
to: number;
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* the activity will be associated with this class from the specified day.
|
|
179
|
+
* If you set 3, the activity will be associated with this class from day 3. So at day 2 it will not be associated with this class.
|
|
180
|
+
*/
|
|
181
|
+
fromDay?: number;
|
|
182
|
+
/**
|
|
183
|
+
* the activity will be associated with this class to the specified day.
|
|
184
|
+
* If you set 3, the activity will be associated with this class until day 3. So at day 4 it will not be associated with this class.
|
|
185
|
+
*/
|
|
186
|
+
toDay?: number;
|
|
187
|
+
}): void;
|
|
188
|
+
removeActivity(activity: ActivityInterface, options?: {
|
|
189
|
+
/**
|
|
190
|
+
* The activity will be excluded from this class only for the specified days.
|
|
191
|
+
* If to 3, the activity will be excluded from this class only for days 1, 2 and 3. So at day 4 it will be associated with this class.
|
|
192
|
+
*/
|
|
193
|
+
toDay?: number;
|
|
194
|
+
}): void;
|
|
195
|
+
clearExpiredActivities(): void;
|
|
196
|
+
get activities(): ActivityInterface[];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
declare class LocationStoredClass extends NavigationAbstractClass implements LocationInternalInterface {
|
|
200
|
+
/**
|
|
201
|
+
* The map where the location is.
|
|
202
|
+
*/
|
|
203
|
+
private readonly _map;
|
|
204
|
+
constructor(id: string,
|
|
205
|
+
/**
|
|
206
|
+
* The map where the location is.
|
|
207
|
+
*/
|
|
208
|
+
_map: MapInterface, activities?: ActivityInterface[]);
|
|
209
|
+
get map(): MapInterface;
|
|
210
|
+
get rooms(): RoomInterface[];
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* The base model of a location. I suggest you extend this class to create your own location model.
|
|
215
|
+
* @example
|
|
216
|
+
* ```typescript
|
|
217
|
+
* export const mcHome = new LocationBaseModel('mc_home', mainMap, {
|
|
218
|
+
* name: 'MC Home',
|
|
219
|
+
* icon: "https://icon.jpg",
|
|
220
|
+
* });
|
|
221
|
+
* ```
|
|
222
|
+
*/
|
|
223
|
+
declare class LocationBaseModel extends LocationStoredClass implements LocationInternalInterface {
|
|
224
|
+
/**
|
|
225
|
+
* @param id The id of the location, it must be unique.
|
|
226
|
+
* @param map The map where the location is.
|
|
227
|
+
* @param props The properties of the location.
|
|
228
|
+
*/
|
|
229
|
+
constructor(id: string, map: MapInterface, props?: LocationBaseModelProps);
|
|
230
|
+
private defaultName;
|
|
231
|
+
/**
|
|
232
|
+
* The name of the location.
|
|
233
|
+
* If you set undefined, it will return the initial value of name.
|
|
234
|
+
*/
|
|
235
|
+
get name(): string;
|
|
236
|
+
set name(value: string | undefined);
|
|
237
|
+
private defaultDisabled;
|
|
238
|
+
/**
|
|
239
|
+
* Whether is disabled. If it is a string, it is a Pixi'VN flag name.
|
|
240
|
+
*/
|
|
241
|
+
get disabled(): boolean;
|
|
242
|
+
set disabled(value: boolean | string);
|
|
243
|
+
private defaultHidden;
|
|
244
|
+
/**
|
|
245
|
+
* Whether is hidden. If it is a string, it is a Pixi'VN flag name.
|
|
246
|
+
*/
|
|
247
|
+
get hidden(): boolean;
|
|
248
|
+
set hidden(value: boolean | string);
|
|
249
|
+
private _icon?;
|
|
250
|
+
/**
|
|
251
|
+
* The icon of the location.
|
|
252
|
+
*/
|
|
253
|
+
get icon(): string | undefined;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
declare class MapStoredClass extends NavigationAbstractClass implements MapBaseInternalInterface {
|
|
257
|
+
constructor(id: string, activities?: ActivityInterface[]);
|
|
258
|
+
get locations(): LocationInterface[];
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* The base model of a map. I suggest you extend this class to create your own map model.
|
|
263
|
+
* @example
|
|
264
|
+
* ```typescript
|
|
265
|
+
* export const mainMap = new MapBaseModel('main_map', {
|
|
266
|
+
* name: 'Main Map',
|
|
267
|
+
* image: "https://image.jpg",
|
|
268
|
+
* });
|
|
269
|
+
* ```
|
|
270
|
+
*/
|
|
271
|
+
declare class MapBaseModel extends MapStoredClass implements MapBaseInternalInterface {
|
|
272
|
+
/**
|
|
273
|
+
* @param id The id of the map, it must be unique.
|
|
274
|
+
* @param props The properties of the map.
|
|
275
|
+
*/
|
|
276
|
+
constructor(id: string, props?: MapBaseModelProps);
|
|
277
|
+
private defaultName;
|
|
278
|
+
/**
|
|
279
|
+
* The name of the map.
|
|
280
|
+
* If you set undefined, it will return the initial value of name.
|
|
281
|
+
*/
|
|
282
|
+
get name(): string;
|
|
283
|
+
set name(value: string | undefined);
|
|
284
|
+
private _image?;
|
|
285
|
+
/**
|
|
286
|
+
* The image of the map.
|
|
287
|
+
*/
|
|
288
|
+
get image(): string | undefined;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
declare class RoomStoredClass extends NavigationAbstractClass implements RoomBaseInternalInterface {
|
|
292
|
+
/**
|
|
293
|
+
* The location where the room is.
|
|
294
|
+
*/
|
|
295
|
+
private readonly _location;
|
|
296
|
+
constructor(id: string,
|
|
297
|
+
/**
|
|
298
|
+
* The location where the room is.
|
|
299
|
+
*/
|
|
300
|
+
_location: LocationInterface, activities?: ActivityInterface[]);
|
|
301
|
+
get routine(): CommitmentInterface[];
|
|
302
|
+
get location(): LocationInterface;
|
|
303
|
+
get characters(): CharacterInterface[];
|
|
304
|
+
get automaticFunction(): OnRunAsyncFunction | undefined;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* The base model of a room. I suggest you extend this class to create your own room model.
|
|
309
|
+
* **You must use the {@link RegisteredRooms.add} function to save the room in the registered rooms.**
|
|
310
|
+
* @example
|
|
311
|
+
* ```ts
|
|
312
|
+
* export const mcRoom = new RoomBaseModel('mc_room', mcHome, {
|
|
313
|
+
* name: "MC Room",
|
|
314
|
+
* icon: "https://icon.jpg",
|
|
315
|
+
* image: "https://image.jpg",
|
|
316
|
+
* })
|
|
317
|
+
* RegisteredRooms.add(mcRoom)
|
|
318
|
+
* ```
|
|
319
|
+
*/
|
|
320
|
+
declare class RoomBaseModel extends RoomStoredClass {
|
|
321
|
+
/**
|
|
322
|
+
* @param id The id of the room, it must be unique.
|
|
323
|
+
* @param location The location where the room is.
|
|
324
|
+
* @param props The properties of the room.
|
|
325
|
+
*/
|
|
326
|
+
constructor(id: string, location: LocationInterface, props?: RoomBaseModelProps);
|
|
327
|
+
private defaultName;
|
|
328
|
+
/**
|
|
329
|
+
* The name.
|
|
330
|
+
* If you set undefined, it will return the initial value of name.
|
|
331
|
+
*/
|
|
332
|
+
get name(): string;
|
|
333
|
+
set name(value: string | undefined);
|
|
334
|
+
private _image?;
|
|
335
|
+
/**
|
|
336
|
+
* The image of the room.
|
|
337
|
+
*/
|
|
338
|
+
get image(): string | undefined;
|
|
339
|
+
private defaultDisabled;
|
|
340
|
+
/**
|
|
341
|
+
* Whether is disabled. If it is a string, it is a Pixi'VN flag name.
|
|
342
|
+
*/
|
|
343
|
+
get disabled(): boolean;
|
|
344
|
+
set disabled(value: boolean | string);
|
|
345
|
+
private defaultHidden;
|
|
346
|
+
/**
|
|
347
|
+
* Whether is hidden. If it is a string, it is a Pixi'VN flag name.
|
|
348
|
+
*/
|
|
349
|
+
get hidden(): boolean;
|
|
350
|
+
set hidden(value: boolean | string);
|
|
351
|
+
private _icon?;
|
|
352
|
+
/**
|
|
353
|
+
* The function for rendering the icon of the room.
|
|
354
|
+
*/
|
|
355
|
+
get icon(): string | undefined;
|
|
356
|
+
/**
|
|
357
|
+
* Get the character commitments of the room.
|
|
358
|
+
* @returns The character commitments of the room.
|
|
359
|
+
*/
|
|
360
|
+
get routine(): CommitmentInterface[];
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
declare class QuestStoredClass extends StoredClassModel implements QuestBaseInternalInterface {
|
|
364
|
+
private readonly _stages;
|
|
365
|
+
constructor(id: string, _stages: StageInterface[], props?: {
|
|
366
|
+
/**
|
|
367
|
+
* The function that will be executed when the quest starts.
|
|
368
|
+
*/
|
|
369
|
+
onStart?: OnRunEvent<QuestInterface>;
|
|
370
|
+
/**
|
|
371
|
+
* The function that will be executed when a stage end in the quest.
|
|
372
|
+
*/
|
|
373
|
+
onNextStage?: OnRunEvent<QuestInterface>;
|
|
374
|
+
});
|
|
375
|
+
get stages(): StageInterface[];
|
|
376
|
+
get currentStageIndex(): number | undefined;
|
|
377
|
+
private set currentStageIndex(value);
|
|
378
|
+
get currentStage(): StageInterface | undefined;
|
|
379
|
+
get started(): boolean;
|
|
380
|
+
get completed(): boolean;
|
|
381
|
+
get inProgress(): boolean;
|
|
382
|
+
get failed(): boolean;
|
|
383
|
+
set failed(value: boolean);
|
|
384
|
+
private _onStart?;
|
|
385
|
+
get onStart(): undefined | OnRunEvent<QuestInterface>;
|
|
386
|
+
private _onNextStage?;
|
|
387
|
+
get onNextStage(): undefined | OnRunEvent<QuestInterface>;
|
|
388
|
+
start(props: OnRunProps): Promise<void>;
|
|
389
|
+
tryToGoNextStage(props: OnRunProps): Promise<boolean>;
|
|
390
|
+
completeCurrentStageAndGoNext(props: OnRunProps): Promise<boolean>;
|
|
391
|
+
goNextStage(props: OnRunProps): Promise<boolean>;
|
|
392
|
+
get currentStageMustStart(): boolean;
|
|
393
|
+
startCurrentStage(props: OnRunProps): Promise<void>;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
declare class QuestBaseModel extends QuestStoredClass {
|
|
397
|
+
constructor(id: string, stages: StageInterface[], props: QuestProps);
|
|
398
|
+
private _name;
|
|
399
|
+
/**
|
|
400
|
+
* The name of the quest.
|
|
401
|
+
*/
|
|
402
|
+
get name(): string;
|
|
403
|
+
private _description;
|
|
404
|
+
/**
|
|
405
|
+
* The description of the quest.
|
|
406
|
+
*/
|
|
407
|
+
get description(): string;
|
|
408
|
+
private _icon?;
|
|
409
|
+
/**
|
|
410
|
+
* Icon of the quest.
|
|
411
|
+
*/
|
|
412
|
+
get icon(): string | undefined;
|
|
413
|
+
private _image?;
|
|
414
|
+
/**
|
|
415
|
+
* Image of the quest.
|
|
416
|
+
*/
|
|
417
|
+
get image(): string | undefined;
|
|
418
|
+
private _inDevelopment;
|
|
419
|
+
/**
|
|
420
|
+
* If the quest is in development.
|
|
421
|
+
*/
|
|
422
|
+
get inDevelopment(): boolean;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
declare class StageStoredClass extends StoredClassModel implements StageBaseInternalInterface {
|
|
426
|
+
constructor(id: string, options?: {
|
|
427
|
+
/**
|
|
428
|
+
* The function that will be executed when the stage starts.
|
|
429
|
+
*/
|
|
430
|
+
onStart?: OnRunEvent<StageInterface>;
|
|
431
|
+
/**
|
|
432
|
+
* The function that will be executed when the stage ends.
|
|
433
|
+
*/
|
|
434
|
+
onEnd?: OnRunEvent<StageInterface>;
|
|
435
|
+
/**
|
|
436
|
+
* The day required to start the stage.
|
|
437
|
+
* @example If the value is 3, and the previous stage ends on day 1, the stage will start on day 4.
|
|
438
|
+
*/
|
|
439
|
+
daysRequiredToStart?: number;
|
|
440
|
+
/**
|
|
441
|
+
* The quests required to start the stage.
|
|
442
|
+
* @default []
|
|
443
|
+
*/
|
|
444
|
+
questsRequiredToStart?: QuestsRequiredType[];
|
|
445
|
+
});
|
|
446
|
+
private _onStart?;
|
|
447
|
+
get onStart(): undefined | OnRunEvent<StageInterface>;
|
|
448
|
+
private _onEnd?;
|
|
449
|
+
get onEnd(): undefined | OnRunEvent<StageInterface>;
|
|
450
|
+
get completed(): boolean;
|
|
451
|
+
set completed(value: boolean);
|
|
452
|
+
get started(): boolean;
|
|
453
|
+
set started(value: boolean);
|
|
454
|
+
private get prevStageEndDay();
|
|
455
|
+
private set prevStageEndDay(value);
|
|
456
|
+
get startDay(): number | undefined;
|
|
457
|
+
get canStart(): boolean;
|
|
458
|
+
inizialize(): void;
|
|
459
|
+
start(props: OnRunProps): Promise<void>;
|
|
460
|
+
private _daysRequiredToStart?;
|
|
461
|
+
get daysRequiredToStart(): number;
|
|
462
|
+
private _questsRequiredToStart;
|
|
463
|
+
get questsRequiredToStart(): QuestsRequiredType[];
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
declare class StageBaseModel extends StageStoredClass {
|
|
467
|
+
constructor(id: string, props: StageProps);
|
|
468
|
+
private _name;
|
|
469
|
+
/**
|
|
470
|
+
* The name of the stage.
|
|
471
|
+
*/
|
|
472
|
+
get name(): string;
|
|
473
|
+
private _description;
|
|
474
|
+
/**
|
|
475
|
+
* The description of the stage.
|
|
476
|
+
*/
|
|
477
|
+
get description(): string;
|
|
478
|
+
private _adviceDescription;
|
|
479
|
+
/**
|
|
480
|
+
* The advice description of the stage.
|
|
481
|
+
*/
|
|
482
|
+
get adviceDescription(): string;
|
|
483
|
+
private _image?;
|
|
484
|
+
/**
|
|
485
|
+
* The image of the stage.
|
|
486
|
+
*/
|
|
487
|
+
get image(): string | undefined;
|
|
488
|
+
private _flags;
|
|
489
|
+
/**
|
|
490
|
+
* The list of flags that the player must complete to finish the stage.
|
|
491
|
+
*/
|
|
492
|
+
get flags(): StageFlags[];
|
|
493
|
+
private _flagsRequiredToStart;
|
|
494
|
+
/**
|
|
495
|
+
* The list of flags required to start the stage.
|
|
496
|
+
*/
|
|
497
|
+
get flagsRequiredToStart(): StageFlags[];
|
|
498
|
+
private _requestDescriptionToStart;
|
|
499
|
+
/**
|
|
500
|
+
* The description of the request to start the stage.
|
|
501
|
+
*/
|
|
502
|
+
get requestDescriptionToStart(): string;
|
|
503
|
+
get completed(): boolean;
|
|
504
|
+
set completed(value: boolean);
|
|
505
|
+
get canStart(): boolean;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
export { ActivityBaseModel, ActivityStoredClass, CommitmentBaseModel, CommitmentStoredClass, LocationBaseModel, LocationStoredClass, MapBaseModel, MapStoredClass, QuestBaseModel, QuestStoredClass, RoomBaseModel, RoomStoredClass, StageBaseModel, StageStoredClass };
|
package/dist/classes/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {StoredClassModel,getFlag,storage}from'@drincs/pixi-vn';var g={};function j(a){try{let e=g[a];if(!e){console.error(`[NQTR] Room ${a} not found`);return}return e}catch(e){console.error(`[NQTR] Error while getting Room ${a}`,e);return}}var V="___nqtr-current_room_memory___",R=class{get rooms(){return Object.values(g)}get locations(){let e={};return Object.values(g).forEach(t=>{e[t.location.id]=t.location;}),Object.values(e)}get maps(){let e={};return Object.values(g).forEach(t=>{e[t.location.map.id]=t.location.map;}),Object.values(e)}get currentRoom(){let e=storage.getVariable(V);if(!e){console.error("[NQTR] The current room has not yet been set");return}let t=j(e);if(!t){console.error(`[NQTR] Current room ${e} not found`);return}return t}set currentRoom(e){if(typeof e!="string"&&(e=e.id),!j(e)){console.error(`[NQTR] The room ${e} is not registered, so it can't be set as current room`);return}storage.setVariable(V,e);}get currentLocation(){return this.currentRoom?.location}get currentMap(){return this.currentRoom?.location.map}clearExpiredActivities(){Object.entries(g).forEach(([e,t])=>{t.clearExpiredActivities();});}};var E={},w={};function C(a){try{let e=E[a];if(!e){console.error(`[NQTR] Commitment ${a} not found`);return}return e}catch(e){console.error(`[NQTR] Error while getting Commitment ${a}`,e);return}}var Q="___nqtr-temporary_commitment___",T=class{get fixedRoutine(){return Object.values(w)}set fixedRoutine(e){e.forEach(t=>{w[t.id]&&console.warn(`[NQTR] Commitment id ${t.id} already exists, it will be overwritten`),w[t.id]=t;});}get temporaryRoutine(){let e=storage.getVariable(Q);return e?e.map(r=>C(r)).filter(r=>r!==undefined):[]}get allRoutine(){return [...this.fixedRoutine,...this.temporaryRoutine]}add(e){Array.isArray(e)||(e=[e]);let t=e.map(r=>{if(!C(r.id)){console.warn(`[NQTR] Commitment ${r.id} not found, it will be ignored`);return}return r.id}).filter(r=>r!==undefined);storage.setVariable(Q,t);}find(e){return C(e)}remove(e){Array.isArray(e)||(e=[e]);let t=e.map(i=>i.id),r=storage.getVariable(Q);r&&(r=r.filter(i=>!t.includes(i)),storage.setVariable(Q,r));}clearExpiredRoutine(){Object.values(E).forEach(e=>{e.expired&&delete E[e.id];});}get currentRoutine(){let e={};return [...this.temporaryRoutine,...this.fixedRoutine].reverse().forEach(t=>{t.isActive&&(t.characters.length>0?t.characters.every(i=>!e[i.id]||t.priority>e[i.id].priority)&&t.characters.forEach(i=>{e[i.id]=t;}):console.error(`[NQTR] The commitment ${t.id} has no characters assigned`));}),Object.values(e)}get currentRoomRoutine(){return h.currentRoom?.routine||[]}getCommitmentByCharacter(e){this.currentRoutine.forEach(t=>{if(t.characters.map(r=>r.id).includes(e.id))return t});}};var f="___nqtr-time_manager_data___";var u=class{static minDayHours=0;static maxDayHours=24;static defaultTimeSpent=1;static timeSlots=[];static weekLength=7;static weekendStartDay=this.weekLength-1;static weekDaysNames=[]};var D=class{initialize(e){let{minDayHours:t=0,maxDayHours:r=24,defaultTimeSpent:i=1,timeSlots:n=[],weekLength:o=7,weekendStartDay:s=o-1,weekDaysNames:c=[]}=e;u.minDayHours=t,u.maxDayHours=r,u.defaultTimeSpent=i,u.timeSlots=n,u.weekLength=o,s>=u.weekLength?console.warn(`[NQTR] Weekend start day should be less than week length ${o}, so will be ignored`):u.weekendStartDay=s,c.length!==o?console.warn(`[NQTR] Week days names should be equal to week length ${o}, so will be ignored`):u.weekDaysNames=c;}get minDayHours(){return u.minDayHours}get maxDayHours(){return u.maxDayHours}get defaultTimeSpent(){return u.defaultTimeSpent}get timeSlots(){return u.timeSlots}get weekLength(){return u.weekLength}get weekendStartDay(){return u.weekendStartDay}get weekDaysNames(){return u.weekDaysNames}get currentHour(){let e=storage.getVariable(f)||{};return e.hasOwnProperty("currentHour")&&typeof e.currentHour=="number"?e.currentHour:this.minDayHours}set currentHour(e){let t=storage.getVariable(f)||{};typeof e=="number"?t.currentHour=e:delete t.currentHour,storage.setVariable(f,t);}get currentDay(){let e=storage.getVariable(f)||{};return e.hasOwnProperty("currentDay")&&typeof e.currentDay=="number"?e.currentDay:0}set currentDay(e){let t=storage.getVariable(f)||{};typeof e=="number"?t.currentDay=e:delete t.currentDay,storage.setVariable(f,t);}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===undefined&&(e=this.minDayHours-1),t===undefined&&(t=this.maxDayHours+1);let r=this.currentHour;return e<t?r>=e&&r<t:r>=e||r<t}};var d=new D,h=new R,N=new T;var Z="__nqtr-activity__",m=class extends StoredClassModel{constructor(t,r,i,n=Z){super(n,t);this._onRun=r;this._fromHour=i.fromHour,this._toHour=i.toHour,this._fromDay=i.fromDay,this._toDay=i.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 t=>this._onRun(this,t)}get expired(){return !!(this.toDay&&this.toDay<=d.currentDay)}get isActive(){return !(this.fromDay&&this.fromDay>d.currentDay||this.toDay&&this.toDay<d.currentDay||!d.nowIsBetween(this.fromHour,this.toHour))}};var H=class extends m{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"?getFlag(e):e}set disabled(e){this.setStorageProperty("disabled",e);}defaultHidden;get hidden(){let e=this.getStorageProperty("hidden")||this.defaultHidden;return typeof e=="string"?getFlag(e):e}set hidden(e){this.setStorageProperty("hidden",e);}_icon;get icon(){return this._icon}};var ee="__nqtr-commitment__",y=class extends m{constructor(t,r,i,n,o){n=n||(()=>{});super(t,n,o,ee);this._characters=r;this._room=i;this.defaultExecutionType=o.executionType||"interaction",this.defaultPriority=o.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 O=class extends y{constructor(e,t,r,i){super(e,t?Array.isArray(t)?t:[t]:[],r,i.onRun,{executionType:i.executionType,priority:i.priority,fromHour:i.fromHour,toHour:i.toHour,fromDay:i.fromDay,toDay:i.toDay}),this._name=i.name||"",this._image=i.image,this.defaultDisabled=i.disabled||false,this.defaultHidden=i.hidden||false,this._icon=i.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"?getFlag(e):e}set disabled(e){this.setStorageProperty("disabled",e);}defaultHidden;get hidden(){if(this.fromDay&&this.fromDay>d.currentDay||!d.nowIsBetween(this.fromHour,this.toHour)||!this.expired)return true;let e=this.getStorageProperty("hidden")||this.defaultHidden;return typeof e=="string"?getFlag(e):e}set hidden(e){this.setStorageProperty("hidden",e);}};var te={};function q(a){try{let e=te[a];if(!e){console.error(`[NQTR] Activity ${a} not found`);return}return e}catch(e){console.error(`[NQTR] Error while getting Activity ${a}`,e);return}}var l=class extends StoredClassModel{constructor(t,r,i=[]){super(t,r);this.defaultActivities=i;}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 i=this.excludedActivitiesScheduling;delete i[t],this.setStorageProperty("excludedActivitiesScheduling",i);}editActivityScheduling(t,r){this.removeActivityScheduling(t);let i=this.activeActivityScheduling;i[t]=r,this.setStorageProperty("activeActivityScheduling",i);}editExcludedActivityScheduling(t,r){this.removeActivityScheduling(t);let i=this.excludedActivitiesScheduling;i[t]=r,this.setStorageProperty("excludedActivitiesScheduling",i);}get additionalActivitiesIds(){return this.getStorageProperty("additionalActivitiesIds")||[]}get excludedActivitiesIds(){return this.getStorageProperty("excludedActivitiesIds")||[]}addActivity(t,r={}){let{hours:i,fromDay:n,toDay:o}=r,s={};if(i){if(i.from>=i.to)throw new Error("[NQTR] The from hour must be less than the to hour.");s.fromHour=i.from;}if(n===0&&console.warn("[NQTR] The from day must be greater than 0, so it will be ignored."),o===0&&console.warn("[NQTR] The to day must be greater than 0, so it will be ignored."),n&&o&&n>=o)throw new Error("[NQTR] The from day must be less than the to day.");if(n&&(s.fromDay=n),o&&(s.toDay=o),this.defaultActivitiesIds.includes(t.id)){console.warn(`[NQTR] Activity with id ${t.id} already exists, so it will be ignored.`);return}let c=this.additionalActivitiesIds;if(c.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}c.push(t.id),this.setStorageProperty("additionalActivitiesIds",c),Object.keys(s).length&&this.editActivityScheduling(t.id,s);}removeActivity(t,r={}){let{toDay:i}=r,n={};i===0&&console.warn("[NQTR] The to day must be greater than 0, so it will be ignored."),i&&(n.toDay=i);let o=this.additionalActivitiesIds;if(o.includes(t.id)){if(Object.keys(n).length){this.editExcludedActivityScheduling(t.id,n);return}o=o.filter(s=>s!==t.id),this.setStorageProperty("additionalActivitiesIds",o);}else if(this.defaultActivitiesIds.includes(t.id)){if(Object.keys(n).length){this.editExcludedActivityScheduling(t.id,n);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,i=this.additionalActivitiesIds,n=this.excludedActivitiesIds;i.forEach(o=>{if(o in t){let{toDay:s}=t[o];s&&s<d.currentDay&&(this.removeActivityScheduling(o),i=i.filter(c=>c!==o));}}),n.forEach(o=>{if(o in r){let{toDay:s}=r[o];s&&s<d.currentDay&&(this.removeActivityScheduling(o),n=n.filter(c=>c!==o));}});}get activities(){let t=[];return Object.entries(this.activeActivityScheduling).forEach(([r,i])=>{let n=q(r),{fromDay:o=n?.fromDay,fromHour:s=n?.fromHour,toDay:c=n?.toDay,toHour:J=n?.toHour}=i;n&&d.nowIsBetween(s,J)&&!(o&&o>d.currentDay)&&!(c&&c<d.currentDay)&&t.push(n);}),Object.entries(this.excludedActivitiesScheduling).forEach(([r,i])=>{let n=q(r);n&&n.isActive&&!(i.toDay&&i.toDay>=d.currentDay)&&t.push(n);}),this.defaultActivities.forEach(r=>{r.isActive&&!t.find(i=>i.id===r.id)&&t.push(r);}),t}};var ie="__nqtr-location__",S=class extends l{constructor(t,r,i=[]){super(ie,t,i);this._map=r;}get map(){return this._map}get rooms(){return h.rooms.filter(t=>t.location.id===this.id)}};var M=class extends S{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"?getFlag(e):e}set disabled(e){this.setStorageProperty("disabled",e);}defaultHidden;get hidden(){let e=this.getStorageProperty("hidden")||this.defaultHidden;return typeof e=="string"?getFlag(e):e}set hidden(e){this.setStorageProperty("hidden",e);}_icon;get icon(){return this._icon}};var ne="__nqtr-map__",v=class extends l{constructor(e,t=[]){super(ne,e,t);}get locations(){return h.locations.filter(e=>e.map.id===this.id)}};var k=class extends v{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 ae="__nqtr-room__",I=class extends l{constructor(t,r,i=[]){super(ae,t,i);this._location=r;}get routine(){return N.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}};var B=class extends I{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"?getFlag(e):e}set disabled(e){this.setStorageProperty("disabled",e);}defaultHidden;get hidden(){let e=this.getStorageProperty("hidden")||this.defaultHidden;return typeof e=="string"?getFlag(e):e}set hidden(e){this.setStorageProperty("hidden",e);}_icon;get icon(){return this._icon}get routine(){return N.currentRoutine.filter(e=>e.room.id===this.id)}};var se="__nqtr-quest__",b=class extends StoredClassModel{constructor(t,r,i={}){super(se,t);this._stages=r;this._onStart=i.onStart,this._onNextStage=i.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===undefined||t>=this.stages.length))return this.stages[t]}get started(){return this.currentStageIndex!==undefined}get completed(){return this.currentStageIndex===undefined?false:this.currentStageIndex>this.stages.length-1}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}start(t){if(this.started){console.warn(`[NQTR] Quest ${this.id} is already started`);return}if(this.stages.length===0){console.error(`[NQTR] Quest ${this.id} has no stages`);return}this.currentStageIndex=0;let r=this.currentStage;if(r&&r.start)return this.onStart&&this.onStart(this,t),r.start(t);console.error(`[NQTR] Quest ${this.id} has no start stage`);}tryToGoNextStage(t){if(!this.started||this.completed)return false;let r=this.currentStage;return r?r.completed?this.goNextStage(t):false:(console.error(`[NQTR] Quest ${this.id} has no current stage`),false)}completeCurrentStageAndGoNext(t){let r=this.currentStage;return r?(r.completed=true,this.goNextStage(t)):(console.error(`[NQTR] Quest ${this.id} has no current stage`),false)}goNextStage(t){if(!this.started)return console.warn(`[NQTR] Quest ${this.id} is not started`),false;if(this.completed)return console.warn(`[NQTR] Quest ${this.id} is already completed`),false;let r=this.currentStage,i=this.currentStageIndex;if(!r||i===undefined)return console.error(`[NQTR] Quest ${this.id} has no current stage`),false;this.currentStageIndex=i+1,this.onNextStage&&this.onNextStage(this,t),r&&r.onEnd&&r.onEnd(r,t);let n=this.currentStage;return n&&(n.inizialize(),this.currentStageMustStart&&this.startCurrentStage(t)),true}get currentStageMustStart(){let t=this.currentStage;return t?!t.started&&t.canStart&&!t.completed:false}startCurrentStage(t){let r=this.currentStage;r&&this.currentStageMustStart?r.start(t):console.warn(`[NQTR] Quest ${this.id} can't start the current stage`);}};var $=class extends b{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 de="__nqtr-stage__",_=class extends StoredClassModel{constructor(e,t={}){super(de,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!==undefined)return e+this.daysRequiredToStart}get canStart(){let e=this.daysRequiredToStart;if(e>0){let t=this.prevStageEndDay;if(t===undefined||t+e>d.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=d.currentDay,console.log(`[NQTR] Stage ${this.id} will start on day ${this.startDay}`));}start(e){this.canStart?(this.started=true,this.onStart&&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 L=class extends _{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=>getFlag(e.flag)):false}set completed(e){super.completed=e;}get canStart(){return this.flagsRequiredToStart.length>0&&!this.flagsRequiredToStart.every(e=>getFlag(e.flag))?false:super.canStart}};export{H as ActivityBaseModel,m as ActivityStoredClass,O as CommitmentBaseModel,y as CommitmentStoredClass,M as LocationBaseModel,S as LocationStoredClass,k as MapBaseModel,v as MapStoredClass,$ as QuestBaseModel,b as QuestStoredClass,B as RoomBaseModel,I as RoomStoredClass,L as StageBaseModel,_ as StageStoredClass};//# sourceMappingURL=index.mjs.map
|
|
1
|
+
import {CachedMap,StoredClassModel,storage,narration}from'@drincs/pixi-vn';var l="___nqtr-time_manager_data___",p="___nqtr-current_room_memory___",J="___nqtr-last_event_memory___";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 H=new CachedMap({cacheSize:20}),te;(n=>{function o(i){if(Array.isArray(i)){i.forEach(a=>n.add(a));return}H.set(i.id,i);}n.add=o;function e(i){try{let a=H.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(H.values())}n.values=t;function r(i){return H.has(i)}n.has=r;})(te||={});var O=te;var S=new CachedMap({cacheSize:20}),M=new CachedMap({cacheSize:20}),ie;(n=>{function o(i){if(Array.isArray(i)){i.forEach(a=>n.add(a));return}console.warn(`[NQTR] Registering commitment ${i.id}`,i),S.set(i.id,i);}n.add=o;function e(i){try{let a=S.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(S.values())}n.values=t;function r(i){return S.has(i)}n.has=r;})(ie||={});var v=ie;var q=new CachedMap({cacheSize:5}),ne;(n=>{function o(i){if(Array.isArray(i)){i.forEach(a=>n.add(a));return}q.set(i.id,i);}n.add=o;function e(i){try{let a=q.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(q.values())}n.values=t;function r(i){return q.has(i)}n.has=r;})(ne||={});var E=new CachedMap({cacheSize:20}),L=new CachedMap({cacheSize:20}),$=new CachedMap({cacheSize:20}),ae;(n=>{function o(i){if(Array.isArray(i)){i.forEach(m=>o(m));return}E.has(i.id)&&console.warn(`[NQTR] Room id ${i.id} already exists, it will be overwritten`),E.set(i.id,i);let a=i.location;L.set(a.id,a);let s=a?.map;s&&$.set(s.id,s);}n.add=o;function e(i){try{let a=E.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(E.values())}n.values=t;function r(i){return E.has(i)}n.has=r;})(ae||={});var I=ae;var w=class{get rooms(){return I.values()}get locations(){return Array.from(L.values())}getLocationById(e){return L.get(e)}get maps(){return Array.from($.values())}getMapById(e){return $.get(e)}get currentRoomId(){return storage.getVariable(p)}get currentRoom(){let e=this.currentRoomId;if(!e){u.error("The current room has not yet been set");return}let t=I.get(e);if(!t){u.error(`Current room ${e} not found`);return}return t}set currentRoom(e){if(typeof e!="string"&&(e=e.id),!I.get(e)){u.error(`The room ${e} is not registered, so it can't be set as current room`);return}let r=storage.getVariable(p);r!==e&&(C({type:"editroom",prev:r,value:e}),storage.setVariable(p,e));}get currentLocation(){return this.currentRoom?.location}get currentMap(){return this.currentRoom?.location.map}clearExpiredActivities(){I.values().forEach(e=>{e.clearExpiredActivities();});}};var Y="___nqtr-temporary_commitment___",N=class{get fixedRoutine(){return [...M.values()]}set fixedRoutine(e){e.forEach(t=>{M.has(t.id)&&console.warn(`[NQTR] Commitment id ${t.id} already exists, it will be overwritten`),M.set(t.id,t);});}get temporaryRoutine(){let e=storage.getVariable(Y);return e?e.map(r=>v.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(!v.get(r.id)){console.warn(`[NQTR] Commitment ${r.id} not found, it will be ignored`);return}return r.id}).filter(r=>r!==void 0);storage.setVariable(Y,t);}find(e){return v.get(e)}remove(e){Array.isArray(e)||(e=[e]);let t=e.map(n=>n.id),r=storage.getVariable(Y);r&&(r=r.filter(n=>!t.includes(n)),storage.setVariable(Y,r));}clearExpiredRoutine(){v.values().forEach(e=>{e.expired&&S.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 g.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 Q=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=storage.getVariable(l)||{};return e.hasOwnProperty("currentHour")&&typeof e.currentHour=="number"?e.currentHour:this.minDayHours}set currentHour(e){let t=storage.getVariable(l)||{},r={...t};typeof e=="number"?r.currentHour=e:delete r.currentHour,C({type:"edittime",prev:t,value:r}),storage.setVariable(l,r);}get currentDay(){let e=storage.getVariable(l)||{};return e.hasOwnProperty("currentDay")&&typeof e.currentDay=="number"?e.currentDay:0}set currentDay(e){let t=storage.getVariable(l)||{},r={...t};typeof e=="number"?r.currentDay=e:delete r.currentDay,C({type:"edittime",prev:t,value:r}),storage.setVariable(l,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 Q,g=new w,V=new N;function C(o){storage.setVariable(J,o);}function he(){return storage.getVariable(J)}function oe(){let o=he(),e=g.currentRoom;if(!e||!e.automaticFunction){narration.addCurrentStepToHistory();return}switch(o?.type){case "editroom":storage.setVariable(p,o.prev),narration.addCurrentStepToHistory(),storage.setVariable(p,e.id);break;case "edittime":let t=storage.getVariable(l)||{};storage.setVariable(l,o.prev),narration.addCurrentStepToHistory(),storage.setVariable(l,t);break}}var ye="__nqtr-activity__",h=class extends StoredClassModel{constructor(t,r,n,i=ye){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=>(oe(),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 F=class extends h{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"?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"?storage.getFlag(e):e}set hidden(e){this.setStorageProperty("hidden",e);}_icon;get icon(){return this._icon}};var Se="__nqtr-commitment__",_=class extends h{constructor(t,r,n,i,a){i=i||(()=>{});super(t,i,a,Se);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 z=class extends _{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"?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"?storage.getFlag(e):e}set hidden(e){this.setStorageProperty("hidden",e);}};var f=class extends 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=O.get(r),{fromDay:a=i?.fromDay,fromHour:s=i?.fromHour,toDay:m=i?.toDay,toHour:le=i?.toHour}=n;i&&c.nowIsBetween(s,le)&&!(a&&a>c.currentDay)&&!(m&&m<c.currentDay)&&t.push(i);}),Object.entries(this.excludedActivitiesScheduling).forEach(([r,n])=>{let i=O.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 Ie="__nqtr-location__",x=class extends f{constructor(t,r,n=[]){super(Ie,t,n);this._map=r;}get map(){return this._map}get rooms(){return g.rooms.filter(t=>t.location.id===this.id)}};var G=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"?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"?storage.getFlag(e):e}set hidden(e){this.setStorageProperty("hidden",e);}_icon;get icon(){return this._icon}};var be="__nqtr-map__",R=class extends f{constructor(e,t=[]){super(be,e,t);}get locations(){return g.locations.filter(e=>e.map.id===this.id)}};var K=class extends R{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 _e="__nqtr-room__",T=class extends f{constructor(t,r,n=[]){super(_e,t,n);this._location=r;}get routine(){return V.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 j=class extends T{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"?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"?storage.getFlag(e):e}set hidden(e){this.setStorageProperty("hidden",e);}_icon;get icon(){return this._icon}get routine(){return V.currentRoutine.filter(e=>e.room.id===this.id)}};var Re="__nqtr-quest__",A=class extends StoredClassModel{constructor(t,r,n={}){super(Re,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 W=class extends A{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 Ae="__nqtr-stage__",D=class extends StoredClassModel{constructor(e,t={}){super(Ae,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 U=class extends D{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=>storage.getFlag(e.flag)):false}set completed(e){super.completed=e;}get canStart(){return this.flagsRequiredToStart.length>0&&!this.flagsRequiredToStart.every(e=>storage.getFlag(e.flag))?false:super.canStart}};export{F as ActivityBaseModel,h as ActivityStoredClass,z as CommitmentBaseModel,_ as CommitmentStoredClass,G as LocationBaseModel,x as LocationStoredClass,K as MapBaseModel,R as MapStoredClass,W as QuestBaseModel,A as QuestStoredClass,j as RoomBaseModel,T as RoomStoredClass,U as StageBaseModel,D as StageStoredClass};//# sourceMappingURL=index.mjs.map
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|