@drincs/nqtr 0.1.15 → 0.1.17
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/ActivityProps-BoJeWa2B.d.mts +124 -0
- package/dist/ActivityProps-_79x9-BX.d.ts +124 -0
- package/dist/{index-Cu8ZAiqF.d.ts → Commitment-BObBFSTM.d.ts} +237 -220
- package/dist/{index-DhsRZJ3g.d.mts → Commitment-BrnOOgEN.d.mts} +237 -220
- package/dist/{index-gJ26gdgL.d.mts → Quest-Bdm0R9LA.d.mts} +7 -12
- package/dist/{index-BjOzVDyw.d.ts → Quest-CxJcXETG.d.ts} +7 -12
- package/dist/classes/Activity.d.mts +41 -127
- package/dist/classes/Activity.d.ts +41 -127
- package/dist/classes/Activity.js +2 -151
- package/dist/classes/Activity.js.map +1 -1
- package/dist/classes/Activity.mjs +2 -148
- package/dist/classes/Activity.mjs.map +1 -1
- package/dist/classes/ActivityStoredAbstract.d.mts +3 -0
- package/dist/classes/ActivityStoredAbstract.d.ts +3 -0
- package/dist/classes/ActivityStoredAbstract.js +399 -0
- package/dist/classes/ActivityStoredAbstract.js.map +1 -0
- package/dist/classes/ActivityStoredAbstract.mjs +397 -0
- package/dist/classes/ActivityStoredAbstract.mjs.map +1 -0
- package/dist/classes/Commitment.d.mts +4 -1
- package/dist/classes/Commitment.d.ts +4 -1
- package/dist/classes/Commitment.js +21 -4
- package/dist/classes/Commitment.js.map +1 -1
- package/dist/classes/Commitment.mjs +21 -4
- package/dist/classes/Commitment.mjs.map +1 -1
- package/dist/classes/index.d.mts +9 -2
- package/dist/classes/index.d.ts +9 -2
- package/dist/classes/index.js +884 -5
- package/dist/classes/index.js.map +1 -1
- package/dist/classes/index.mjs +879 -6
- package/dist/classes/index.mjs.map +1 -1
- package/dist/classes/navigation/ActivityRoom.d.mts +5 -2
- package/dist/classes/navigation/ActivityRoom.d.ts +5 -2
- package/dist/classes/navigation/ActivityRoom.js +3 -3
- package/dist/classes/navigation/ActivityRoom.js.map +1 -1
- package/dist/classes/navigation/ActivityRoom.mjs +3 -3
- package/dist/classes/navigation/ActivityRoom.mjs.map +1 -1
- package/dist/classes/navigation/Location.d.mts +5 -2
- package/dist/classes/navigation/Location.d.ts +5 -2
- package/dist/classes/navigation/Location.js.map +1 -1
- package/dist/classes/navigation/Location.mjs.map +1 -1
- package/dist/classes/navigation/Map.d.mts +5 -2
- package/dist/classes/navigation/Map.d.ts +5 -2
- package/dist/classes/navigation/Map.js.map +1 -1
- package/dist/classes/navigation/Map.mjs.map +1 -1
- package/dist/classes/navigation/Room.d.mts +4 -1
- package/dist/classes/navigation/Room.d.ts +4 -1
- package/dist/classes/navigation/Room.js +3 -3
- package/dist/classes/navigation/Room.js.map +1 -1
- package/dist/classes/navigation/Room.mjs +3 -3
- package/dist/classes/navigation/Room.mjs.map +1 -1
- package/dist/classes/quest/Goal.d.mts +3 -6
- package/dist/classes/quest/Goal.d.ts +3 -6
- package/dist/classes/quest/Goal.js.map +1 -1
- package/dist/classes/quest/Goal.mjs.map +1 -1
- package/dist/classes/quest/Quest.d.mts +3 -1
- package/dist/classes/quest/Quest.d.ts +3 -1
- package/dist/classes/quest/Quest.js.map +1 -1
- package/dist/classes/quest/Quest.mjs.map +1 -1
- package/dist/classes/quest/Stage.d.mts +3 -1
- package/dist/classes/quest/Stage.d.ts +3 -1
- package/dist/classes/quest/Stage.js.map +1 -1
- package/dist/classes/quest/Stage.mjs.map +1 -1
- package/dist/decorators/ActivityDecorator.d.mts +16 -0
- package/dist/decorators/ActivityDecorator.d.ts +16 -0
- package/dist/decorators/ActivityDecorator.js.map +1 -1
- package/dist/decorators/ActivityDecorator.mjs.map +1 -1
- package/dist/decorators/CommitmentDecorator.d.mts +5 -2
- package/dist/decorators/CommitmentDecorator.d.ts +5 -2
- package/dist/decorators/CommitmentDecorator.js +3 -3
- package/dist/decorators/CommitmentDecorator.js.map +1 -1
- package/dist/decorators/CommitmentDecorator.mjs +3 -3
- package/dist/decorators/CommitmentDecorator.mjs.map +1 -1
- package/dist/decorators/RoomDecorator.d.mts +9 -2
- package/dist/decorators/RoomDecorator.d.ts +9 -2
- package/dist/decorators/RoomDecorator.js.map +1 -1
- package/dist/decorators/RoomDecorator.mjs.map +1 -1
- package/dist/decorators/index.d.mts +4 -1
- package/dist/decorators/index.d.ts +4 -1
- package/dist/decorators/index.js +3 -3
- package/dist/decorators/index.js.map +1 -1
- package/dist/decorators/index.mjs +3 -3
- package/dist/decorators/index.mjs.map +1 -1
- package/dist/functions/ActivityFunctions.d.mts +5 -2
- package/dist/functions/ActivityFunctions.d.ts +5 -2
- package/dist/functions/ActivityFunctions.js.map +1 -1
- package/dist/functions/ActivityFunctions.mjs.map +1 -1
- package/dist/functions/NavigationFunctions.d.mts +5 -2
- package/dist/functions/NavigationFunctions.d.ts +5 -2
- package/dist/functions/NavigationFunctions.js.map +1 -1
- package/dist/functions/NavigationFunctions.mjs.map +1 -1
- package/dist/functions/RoutineFunctions.d.mts +5 -2
- package/dist/functions/RoutineFunctions.d.ts +5 -2
- package/dist/functions/RoutineFunctions.js.map +1 -1
- package/dist/functions/RoutineFunctions.mjs.map +1 -1
- package/dist/functions/index.d.mts +5 -2
- package/dist/functions/index.d.ts +5 -2
- package/dist/functions/index.js.map +1 -1
- package/dist/functions/index.mjs.map +1 -1
- package/dist/index.d.mts +9 -4
- package/dist/index.d.ts +9 -4
- package/dist/index.js +171 -154
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +171 -154
- package/dist/index.mjs.map +1 -1
- package/dist/interface/ActivityProps.d.mts +3 -0
- package/dist/interface/ActivityProps.d.ts +3 -0
- package/dist/{override/OnRunActivityProps.js → interface/ActivityProps.js} +1 -1
- package/dist/interface/ActivityProps.mjs +3 -0
- package/dist/interface/CommitmentProps.d.mts +8 -0
- package/dist/interface/CommitmentProps.d.ts +8 -0
- package/dist/interface/CommitmentProps.js +4 -0
- package/dist/interface/CommitmentProps.js.map +1 -0
- package/dist/interface/CommitmentProps.mjs +3 -0
- package/dist/interface/CommitmentProps.mjs.map +1 -0
- package/dist/interface/RoomActivityMemory.d.mts +9 -0
- package/dist/interface/RoomActivityMemory.d.ts +9 -0
- package/dist/interface/RoomActivityMemory.js +4 -0
- package/dist/interface/RoomActivityMemory.js.map +1 -0
- package/dist/interface/RoomActivityMemory.mjs +3 -0
- package/dist/interface/RoomActivityMemory.mjs.map +1 -0
- package/dist/interface/RoomProps.d.mts +8 -0
- package/dist/interface/RoomProps.d.ts +8 -0
- package/dist/interface/RoomProps.js +4 -0
- package/dist/interface/RoomProps.js.map +1 -0
- package/dist/interface/RoomProps.mjs +3 -0
- package/dist/interface/RoomProps.mjs.map +1 -0
- package/dist/interface/index.d.mts +12 -0
- package/dist/interface/index.d.ts +12 -0
- package/dist/interface/index.js +4 -0
- package/dist/interface/index.js.map +1 -0
- package/dist/interface/index.mjs +3 -0
- package/dist/interface/index.mjs.map +1 -0
- package/dist/interface/navigation/LocationProps.d.mts +8 -0
- package/dist/interface/navigation/LocationProps.d.ts +8 -0
- package/dist/interface/navigation/LocationProps.js +4 -0
- package/dist/interface/navigation/LocationProps.js.map +1 -0
- package/dist/interface/navigation/LocationProps.mjs +3 -0
- package/dist/interface/navigation/LocationProps.mjs.map +1 -0
- package/dist/interface/navigation/MapProps.d.mts +8 -0
- package/dist/interface/navigation/MapProps.d.ts +8 -0
- package/dist/interface/navigation/MapProps.js +4 -0
- package/dist/interface/navigation/MapProps.js.map +1 -0
- package/dist/interface/navigation/MapProps.mjs +3 -0
- package/dist/interface/navigation/MapProps.mjs.map +1 -0
- package/dist/interface/quest/GoalProps.d.mts +7 -0
- package/dist/interface/quest/GoalProps.d.ts +7 -0
- package/dist/interface/quest/GoalProps.js +4 -0
- package/dist/interface/quest/GoalProps.js.map +1 -0
- package/dist/interface/quest/GoalProps.mjs +3 -0
- package/dist/interface/quest/GoalProps.mjs.map +1 -0
- package/dist/interface/quest/QuestProps.d.mts +9 -0
- package/dist/interface/quest/QuestProps.d.ts +9 -0
- package/dist/interface/quest/QuestProps.js +4 -0
- package/dist/interface/quest/QuestProps.js.map +1 -0
- package/dist/interface/quest/QuestProps.mjs +3 -0
- package/dist/interface/quest/QuestProps.mjs.map +1 -0
- package/dist/interface/quest/StageProps.d.mts +5 -0
- package/dist/interface/quest/StageProps.d.ts +5 -0
- package/dist/interface/quest/StageProps.js +4 -0
- package/dist/interface/quest/StageProps.js.map +1 -0
- package/dist/interface/quest/StageProps.mjs +3 -0
- package/dist/interface/quest/StageProps.mjs.map +1 -0
- package/dist/managers/TimeManager.d.mts +1 -1
- package/dist/managers/TimeManager.d.ts +1 -1
- package/dist/managers/TimeManager.js +1 -1
- package/dist/managers/TimeManager.js.map +1 -1
- package/dist/managers/TimeManager.mjs +1 -1
- package/dist/managers/TimeManager.mjs.map +1 -1
- package/dist/managers/index.js +1 -1
- package/dist/managers/index.js.map +1 -1
- package/dist/managers/index.mjs +1 -1
- package/dist/managers/index.mjs.map +1 -1
- package/dist/override/{OnRunActivityProps.d.mts → OnRunProps.d.mts} +3 -3
- package/dist/override/{OnRunActivityProps.d.ts → OnRunProps.d.ts} +3 -3
- package/dist/override/OnRunProps.js +4 -0
- package/dist/override/OnRunProps.js.map +1 -0
- package/dist/override/OnRunProps.mjs +3 -0
- package/dist/override/OnRunProps.mjs.map +1 -0
- package/dist/override/index.d.mts +1 -1
- package/dist/override/index.d.ts +1 -1
- package/dist/types/OnRunActivityEvent.d.mts +8 -0
- package/dist/types/OnRunActivityEvent.d.ts +8 -0
- package/dist/types/OnRunActivityEvent.js +4 -0
- package/dist/types/OnRunActivityEvent.js.map +1 -0
- package/dist/types/OnRunActivityEvent.mjs +3 -0
- package/dist/types/OnRunActivityEvent.mjs.map +1 -0
- package/dist/types/OnRunCommitmentEvent.d.mts +8 -0
- package/dist/types/OnRunCommitmentEvent.d.ts +8 -0
- package/dist/types/OnRunCommitmentEvent.js +4 -0
- package/dist/types/OnRunCommitmentEvent.js.map +1 -0
- package/dist/types/OnRunCommitmentEvent.mjs +3 -0
- package/dist/types/OnRunCommitmentEvent.mjs.map +1 -0
- package/dist/types/QuestsRequired.d.mts +4 -2
- package/dist/types/QuestsRequired.d.ts +4 -2
- package/dist/types/index.d.mts +4 -2
- package/dist/types/index.d.ts +4 -2
- package/package.json +2 -2
- package/dist/classes/navigation/index.d.mts +0 -5
- package/dist/classes/navigation/index.d.ts +0 -5
- package/dist/classes/navigation/index.js +0 -987
- package/dist/classes/navigation/index.js.map +0 -1
- package/dist/classes/navigation/index.mjs +0 -983
- package/dist/classes/navigation/index.mjs.map +0 -1
- package/dist/classes/quest/index.d.mts +0 -3
- package/dist/classes/quest/index.d.ts +0 -3
- package/dist/classes/quest/index.js +0 -133
- package/dist/classes/quest/index.js.map +0 -1
- package/dist/classes/quest/index.mjs +0 -129
- package/dist/classes/quest/index.mjs.map +0 -1
- package/dist/override/OnRunActivityProps.mjs +0 -3
- /package/dist/{override/OnRunActivityProps.js.map → interface/ActivityProps.js.map} +0 -0
- /package/dist/{override/OnRunActivityProps.mjs.map → interface/ActivityProps.mjs.map} +0 -0
|
@@ -1,14 +1,41 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { StoredClassModel, CharacterBaseModel } from '@drincs/pixi-vn';
|
|
1
|
+
import { GraphicItemType, OnRenderGraphicItemProps, OnRunProps } from '@drincs/nqtr/dist/override';
|
|
2
|
+
import { CharacterBaseModel, StoredClassModel } from '@drincs/pixi-vn';
|
|
4
3
|
import { ExecutionTypeEnum } from './enums/ExecutionTypeEnum.mjs';
|
|
4
|
+
import ActivityModel from './classes/Activity.mjs';
|
|
5
|
+
import { a as ActivityStoredAbstract, A as ActivityProps } from './ActivityProps-BoJeWa2B.mjs';
|
|
6
|
+
import { OnRunActivityEvent } from './types/OnRunActivityEvent.mjs';
|
|
7
|
+
import { OnRunCommitmentEvent } from './types/OnRunCommitmentEvent.mjs';
|
|
5
8
|
|
|
6
|
-
interface
|
|
9
|
+
interface CommitmentProps<TCharacter extends CharacterBaseModel = CharacterBaseModel, TRoom extends RoomBaseModel = RoomBaseModel> {
|
|
7
10
|
/**
|
|
8
11
|
* The name
|
|
9
12
|
* @default ""
|
|
10
13
|
*/
|
|
11
14
|
name?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The hour when the commitment starts. If the commitment is not started yet, it will be hidden.
|
|
17
|
+
* If you set 3, the commitment will be hidden into hours 1 and 2, and will be shown from hour 3.
|
|
18
|
+
* @default TimeManager.minDayHours
|
|
19
|
+
*/
|
|
20
|
+
fromHour?: number;
|
|
21
|
+
/**
|
|
22
|
+
* The hour when the commitment ends. If the commitment is ended yet, it will be hidden.
|
|
23
|
+
* If you set 3, the commitment will be shown into hours 1 and 2 and will be hidden from hour 3.
|
|
24
|
+
* @default TimeManager.maxDayHours + 1
|
|
25
|
+
*/
|
|
26
|
+
toHour?: number;
|
|
27
|
+
/**
|
|
28
|
+
* The day when the commitment starts. If the commitment is not started yet, it will be hidden.
|
|
29
|
+
* If you set 3, the commitment will be hidden into days 1 and 2, and will be shown from day 3.
|
|
30
|
+
* @default undefined
|
|
31
|
+
*/
|
|
32
|
+
fromDay?: number;
|
|
33
|
+
/**
|
|
34
|
+
* The day when the commitment ends. If the commitment is ended yet, it will be deleted or hidden.
|
|
35
|
+
* If you set 3, the commitment will be shown into days 1 and 2 and will be deleted or hidden from day 3.
|
|
36
|
+
* @default undefined
|
|
37
|
+
*/
|
|
38
|
+
toDay?: number;
|
|
12
39
|
/**
|
|
13
40
|
* The image. It can be a string, an Element or a Pixi'VN Canvas Item.
|
|
14
41
|
* Or an object to manage multiple image types. For example to have a image based on time.
|
|
@@ -23,7 +50,81 @@ interface MapBaseModelProps {
|
|
|
23
50
|
* ```
|
|
24
51
|
* @default undefined
|
|
25
52
|
*/
|
|
26
|
-
renderImage?: GraphicItemType | ((
|
|
53
|
+
renderImage?: GraphicItemType | ((commitment: CommitmentBaseModel<TCharacter, TRoom>, props: OnRenderGraphicItemProps) => GraphicItemType);
|
|
54
|
+
/**
|
|
55
|
+
* 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.
|
|
56
|
+
* @default ExecutionTypeEnum.INTERACTION
|
|
57
|
+
*/
|
|
58
|
+
executionType?: ExecutionTypeEnum;
|
|
59
|
+
/**
|
|
60
|
+
* Is a function that is called when the player interacts with the character.
|
|
61
|
+
* @param commitment
|
|
62
|
+
* @returns
|
|
63
|
+
* @default undefined
|
|
64
|
+
*/
|
|
65
|
+
onRun?: OnRunCommitmentEvent<CommitmentBaseModel>;
|
|
66
|
+
/**
|
|
67
|
+
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
68
|
+
* 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.
|
|
69
|
+
* @default false
|
|
70
|
+
*/
|
|
71
|
+
disabled?: boolean | string;
|
|
72
|
+
/**
|
|
73
|
+
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
74
|
+
* @default false
|
|
75
|
+
*/
|
|
76
|
+
hidden?: boolean | string;
|
|
77
|
+
/**
|
|
78
|
+
* The icon element. Can be a string or an Element or a Pixi'VN CanvasItem
|
|
79
|
+
* @default undefined
|
|
80
|
+
*/
|
|
81
|
+
renderIcon?: GraphicItemType | ((commitment: CommitmentBaseModel, props: OnRenderGraphicItemProps) => GraphicItemType);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
interface LocationProps<TMap extends MapBaseModel = MapBaseModel> {
|
|
85
|
+
/**
|
|
86
|
+
* The name
|
|
87
|
+
* @default ""
|
|
88
|
+
*/
|
|
89
|
+
name?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
92
|
+
* @default false
|
|
93
|
+
*/
|
|
94
|
+
disabled?: boolean | string;
|
|
95
|
+
/**
|
|
96
|
+
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
97
|
+
* @default false
|
|
98
|
+
*/
|
|
99
|
+
hidden?: boolean | string;
|
|
100
|
+
/**
|
|
101
|
+
* The icon element. Can be a string or an Element or a Pixi'VN CanvasItem
|
|
102
|
+
* @default undefined
|
|
103
|
+
*/
|
|
104
|
+
renderIcon?: GraphicItemType | ((location: LocationBaseModel<TMap>, props: OnRenderGraphicItemProps) => GraphicItemType);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
interface MapProps {
|
|
108
|
+
/**
|
|
109
|
+
* The name
|
|
110
|
+
* @default ""
|
|
111
|
+
*/
|
|
112
|
+
name?: string;
|
|
113
|
+
/**
|
|
114
|
+
* The image. It can be a string, an Element or a Pixi'VN Canvas Item.
|
|
115
|
+
* Or an object to manage multiple image types. For example to have a image based on time.
|
|
116
|
+
* @example
|
|
117
|
+
* ```ts
|
|
118
|
+
* {
|
|
119
|
+
* "morning": "morning-background.jpg",
|
|
120
|
+
* "afternoon": "afternoon-background.jpg",
|
|
121
|
+
* "evening": "evening-background.jpg",
|
|
122
|
+
* "night": "night-background.jpg"
|
|
123
|
+
* }
|
|
124
|
+
* ```
|
|
125
|
+
* @default undefined
|
|
126
|
+
*/
|
|
127
|
+
renderImage?: GraphicItemType | ((map: MapBaseModel, props: OnRenderGraphicItemProps) => GraphicItemType);
|
|
27
128
|
/**
|
|
28
129
|
* The neighboring maps that are available in this map.
|
|
29
130
|
* @example
|
|
@@ -51,6 +152,72 @@ interface MapBaseModelProps {
|
|
|
51
152
|
*/
|
|
52
153
|
hidden?: boolean | string;
|
|
53
154
|
}
|
|
155
|
+
|
|
156
|
+
interface RoomProps<TLocation extends LocationBaseModel = LocationBaseModel> {
|
|
157
|
+
/**
|
|
158
|
+
* The name
|
|
159
|
+
* @default ""
|
|
160
|
+
*/
|
|
161
|
+
name?: string;
|
|
162
|
+
/**
|
|
163
|
+
* The image. It can be a string, an Element or a Pixi'VN Canvas Item.
|
|
164
|
+
* Or an object to manage multiple image types. For example to have a image based on time.
|
|
165
|
+
* @example
|
|
166
|
+
* ```ts
|
|
167
|
+
* {
|
|
168
|
+
* "morning": "morning-background.jpg",
|
|
169
|
+
* "afternoon": "afternoon-background.jpg",
|
|
170
|
+
* "evening": "evening-background.jpg",
|
|
171
|
+
* "night": "night-background.jpg"
|
|
172
|
+
* }
|
|
173
|
+
* ```
|
|
174
|
+
* @default undefined
|
|
175
|
+
*/
|
|
176
|
+
renderImage?: GraphicItemType | ((room: RoomBaseModel<TLocation>, props: OnRenderGraphicItemProps) => GraphicItemType);
|
|
177
|
+
/**
|
|
178
|
+
* The activities that are available in this room.
|
|
179
|
+
* @default []
|
|
180
|
+
*/
|
|
181
|
+
defaultActivities?: ActivityModel[];
|
|
182
|
+
/**
|
|
183
|
+
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
184
|
+
* @default false
|
|
185
|
+
*/
|
|
186
|
+
disabled?: boolean | string;
|
|
187
|
+
/**
|
|
188
|
+
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
189
|
+
* @default false
|
|
190
|
+
*/
|
|
191
|
+
hidden?: boolean | string;
|
|
192
|
+
/**
|
|
193
|
+
* The icon element. Can be a string or an Element or a Pixi'VN CanvasItem
|
|
194
|
+
* @default undefined
|
|
195
|
+
*/
|
|
196
|
+
renderIcon?: GraphicItemType | ((room: RoomBaseModel<TLocation>, props: OnRenderGraphicItemProps) => GraphicItemType);
|
|
197
|
+
/**
|
|
198
|
+
* Whether is an entrance room, so when the player enters in the location, it will be the first room to be shown.
|
|
199
|
+
* @default false
|
|
200
|
+
*/
|
|
201
|
+
isEntrance?: boolean;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* The activity generated by the room.
|
|
206
|
+
*/
|
|
207
|
+
declare class ActivityRoom<TRoom extends RoomBaseModel = RoomBaseModel> extends ActivityStoredAbstract {
|
|
208
|
+
constructor(id: string, room: TRoom, onRun: OnRunActivityEvent<ActivityStoredAbstract>, props: ActivityProps);
|
|
209
|
+
setStorageProperty<T>(_: string, __: T | undefined): void;
|
|
210
|
+
getStorageProperty<T>(propertyName: string): T | undefined;
|
|
211
|
+
private _id;
|
|
212
|
+
get id(): string;
|
|
213
|
+
/**
|
|
214
|
+
* The room where the activity is.
|
|
215
|
+
*/
|
|
216
|
+
private _room;
|
|
217
|
+
get room(): TRoom;
|
|
218
|
+
export(): object;
|
|
219
|
+
}
|
|
220
|
+
|
|
54
221
|
/**
|
|
55
222
|
* The base model of a map. I suggest you extend this class to create your own map model.
|
|
56
223
|
* @example
|
|
@@ -72,7 +239,7 @@ declare class MapBaseModel extends StoredClassModel {
|
|
|
72
239
|
* @param id The id of the map, it must be unique.
|
|
73
240
|
* @param props The properties of the map.
|
|
74
241
|
*/
|
|
75
|
-
constructor(id: string, props?:
|
|
242
|
+
constructor(id: string, props?: MapProps);
|
|
76
243
|
private defaultName;
|
|
77
244
|
/**
|
|
78
245
|
* The name of the map.
|
|
@@ -84,7 +251,7 @@ declare class MapBaseModel extends StoredClassModel {
|
|
|
84
251
|
/**
|
|
85
252
|
* The function for rendering the image of the map.
|
|
86
253
|
*/
|
|
87
|
-
get renderImage(): ((props
|
|
254
|
+
get renderImage(): ((props: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
|
|
88
255
|
private defaultDisabled;
|
|
89
256
|
/**
|
|
90
257
|
* Whether is disabled. If it is a string, it is a Pixi'VN flag name.
|
|
@@ -124,70 +291,74 @@ declare class MapBaseModel extends StoredClassModel {
|
|
|
124
291
|
}
|
|
125
292
|
|
|
126
293
|
/**
|
|
127
|
-
* The
|
|
294
|
+
* The base model of a location. I suggest you extend this class to create your own location model.
|
|
295
|
+
* @example
|
|
296
|
+
* ```typescript
|
|
297
|
+
* export const mcHome = new LocationBaseModel('mc_home', mainMap, {
|
|
298
|
+
* name: 'MC Home',
|
|
299
|
+
* icon: "https://icon.jpg",
|
|
300
|
+
* });
|
|
301
|
+
* ```
|
|
128
302
|
*/
|
|
129
|
-
declare class
|
|
130
|
-
constructor(id: string, room: TRoom, onRun: OnRunActivityEvent<ActivityStoredAbstract>, props: ActivityProps);
|
|
131
|
-
setStorageProperty<T>(_: string, __: T | undefined): void;
|
|
132
|
-
getStorageProperty<T>(propertyName: string): T | undefined;
|
|
133
|
-
private _id;
|
|
134
|
-
get id(): string;
|
|
303
|
+
declare class LocationBaseModel<TMap extends MapBaseModel = MapBaseModel> extends StoredClassModel {
|
|
135
304
|
/**
|
|
136
|
-
* The
|
|
305
|
+
* @param id The id of the location, it must be unique.
|
|
306
|
+
* @param map The map where the location is.
|
|
307
|
+
* @param props The properties of the location.
|
|
137
308
|
*/
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
export(): object;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
declare const ROOM_CATEGORY = "__nqtr-room__";
|
|
144
|
-
interface RoomBaseModelProps<TLocation extends LocationBaseModel = LocationBaseModel> {
|
|
309
|
+
constructor(id: string, map: TMap, props?: LocationProps<TMap>);
|
|
310
|
+
private defaultName;
|
|
145
311
|
/**
|
|
146
|
-
* The name
|
|
147
|
-
*
|
|
312
|
+
* The name of the location.
|
|
313
|
+
* If you set undefined, it will return the initial value of name.
|
|
148
314
|
*/
|
|
149
|
-
name
|
|
315
|
+
get name(): string;
|
|
316
|
+
set name(value: string | undefined);
|
|
317
|
+
private defaultDisabled;
|
|
150
318
|
/**
|
|
151
|
-
*
|
|
152
|
-
* Or an object to manage multiple image types. For example to have a image based on time.
|
|
153
|
-
* @example
|
|
154
|
-
* ```ts
|
|
155
|
-
* {
|
|
156
|
-
* "morning": "morning-background.jpg",
|
|
157
|
-
* "afternoon": "afternoon-background.jpg",
|
|
158
|
-
* "evening": "evening-background.jpg",
|
|
159
|
-
* "night": "night-background.jpg"
|
|
160
|
-
* }
|
|
161
|
-
* ```
|
|
162
|
-
* @default undefined
|
|
319
|
+
* Whether is disabled. If it is a string, it is a Pixi'VN flag name.
|
|
163
320
|
*/
|
|
164
|
-
|
|
321
|
+
get disabled(): boolean;
|
|
322
|
+
set disabled(value: boolean | string);
|
|
323
|
+
private defaultHidden;
|
|
165
324
|
/**
|
|
166
|
-
*
|
|
167
|
-
* @default []
|
|
325
|
+
* Whether is hidden. If it is a string, it is a Pixi'VN flag name.
|
|
168
326
|
*/
|
|
169
|
-
|
|
327
|
+
get hidden(): boolean;
|
|
328
|
+
set hidden(value: boolean | string);
|
|
329
|
+
private _renderIcon?;
|
|
170
330
|
/**
|
|
171
|
-
*
|
|
172
|
-
* @default false
|
|
331
|
+
* The function for rendering the icon of the location.
|
|
173
332
|
*/
|
|
174
|
-
|
|
333
|
+
get renderIcon(): ((props: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
|
|
334
|
+
private _map;
|
|
175
335
|
/**
|
|
176
|
-
*
|
|
177
|
-
* @default false
|
|
336
|
+
* The map where the location is.
|
|
178
337
|
*/
|
|
179
|
-
|
|
338
|
+
get map(): TMap;
|
|
180
339
|
/**
|
|
181
|
-
*
|
|
182
|
-
*
|
|
340
|
+
* Get the entrance room of the location.
|
|
341
|
+
* You can cast the room to a specific type that extends RoomBaseModel.
|
|
342
|
+
* @returns The entrance room or the first room if there is no entrance.
|
|
343
|
+
* @example
|
|
344
|
+
* ```typescript
|
|
345
|
+
* const entranceHome = new RoomBaseModel("entrance-home", home, { isEntrance: true })
|
|
346
|
+
* saveRoom(entranceHome)
|
|
347
|
+
* const home = new LocationBaseModel("home", map, { name: "Home" })
|
|
348
|
+
*
|
|
349
|
+
* const entrance = home.getEntrance() // entrance === entranceHome
|
|
350
|
+
* ```
|
|
183
351
|
*/
|
|
184
|
-
|
|
352
|
+
getEntrance<TRoom extends RoomBaseModel = RoomBaseModel>(): TRoom | undefined;
|
|
185
353
|
/**
|
|
186
|
-
*
|
|
187
|
-
*
|
|
354
|
+
* Get all rooms in the location.
|
|
355
|
+
* You can cast the rooms to a specific type that extends RoomBaseModel.
|
|
356
|
+
* @returns The rooms in the location.
|
|
188
357
|
*/
|
|
189
|
-
|
|
358
|
+
getRooms<TRoom extends RoomBaseModel = RoomBaseModel>(): TRoom[];
|
|
190
359
|
}
|
|
360
|
+
|
|
361
|
+
declare const ROOM_CATEGORY = "__nqtr-room__";
|
|
191
362
|
/**
|
|
192
363
|
* The base model of a room. I suggest you extend this class to create your own room model.
|
|
193
364
|
* You must use the saveRoom function to save the room in the registered rooms.
|
|
@@ -208,7 +379,7 @@ declare class RoomBaseModel<TLocation extends LocationBaseModel = LocationBaseMo
|
|
|
208
379
|
* @param location The location where the room is.
|
|
209
380
|
* @param props The properties of the room.
|
|
210
381
|
*/
|
|
211
|
-
constructor(id: string, location: TLocation, props?:
|
|
382
|
+
constructor(id: string, location: TLocation, props?: RoomProps<TLocation>);
|
|
212
383
|
private _location;
|
|
213
384
|
/**
|
|
214
385
|
* The location where the room is.
|
|
@@ -230,7 +401,7 @@ declare class RoomBaseModel<TLocation extends LocationBaseModel = LocationBaseMo
|
|
|
230
401
|
/**
|
|
231
402
|
* The function for rendering the image of the room.
|
|
232
403
|
*/
|
|
233
|
-
get renderImage(): ((props
|
|
404
|
+
get renderImage(): ((props: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
|
|
234
405
|
private defaultActivityIds;
|
|
235
406
|
/**
|
|
236
407
|
* The activities that are available in this room.
|
|
@@ -289,7 +460,7 @@ declare class RoomBaseModel<TLocation extends LocationBaseModel = LocationBaseMo
|
|
|
289
460
|
/**
|
|
290
461
|
* The function for rendering the icon of the room.
|
|
291
462
|
*/
|
|
292
|
-
get renderIcon(): ((props
|
|
463
|
+
get renderIcon(): ((props: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
|
|
293
464
|
/**
|
|
294
465
|
* Get the character commitments of the room.
|
|
295
466
|
* @returns The character commitments of the room.
|
|
@@ -297,165 +468,6 @@ declare class RoomBaseModel<TLocation extends LocationBaseModel = LocationBaseMo
|
|
|
297
468
|
getRoutine<TCommitment extends CommitmentBaseModel = CommitmentBaseModel>(): TCommitment[];
|
|
298
469
|
}
|
|
299
470
|
|
|
300
|
-
interface LocationBaseModelProps<TMap extends MapBaseModel = MapBaseModel> {
|
|
301
|
-
/**
|
|
302
|
-
* The name
|
|
303
|
-
* @default ""
|
|
304
|
-
*/
|
|
305
|
-
name?: string;
|
|
306
|
-
/**
|
|
307
|
-
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
308
|
-
* @default false
|
|
309
|
-
*/
|
|
310
|
-
disabled?: boolean | string;
|
|
311
|
-
/**
|
|
312
|
-
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
313
|
-
* @default false
|
|
314
|
-
*/
|
|
315
|
-
hidden?: boolean | string;
|
|
316
|
-
/**
|
|
317
|
-
* The icon element. Can be a string or an Element or a Pixi'VN CanvasItem
|
|
318
|
-
* @default undefined
|
|
319
|
-
*/
|
|
320
|
-
renderIcon?: GraphicItemType | ((location: LocationBaseModel<TMap>, props?: OnRenderGraphicItemProps) => GraphicItemType);
|
|
321
|
-
}
|
|
322
|
-
/**
|
|
323
|
-
* The base model of a location. I suggest you extend this class to create your own location model.
|
|
324
|
-
* @example
|
|
325
|
-
* ```typescript
|
|
326
|
-
* export const mcHome = new LocationBaseModel('mc_home', mainMap, {
|
|
327
|
-
* name: 'MC Home',
|
|
328
|
-
* icon: "https://icon.jpg",
|
|
329
|
-
* });
|
|
330
|
-
* ```
|
|
331
|
-
*/
|
|
332
|
-
declare class LocationBaseModel<TMap extends MapBaseModel = MapBaseModel> extends StoredClassModel {
|
|
333
|
-
/**
|
|
334
|
-
* @param id The id of the location, it must be unique.
|
|
335
|
-
* @param map The map where the location is.
|
|
336
|
-
* @param props The properties of the location.
|
|
337
|
-
*/
|
|
338
|
-
constructor(id: string, map: TMap, props?: LocationBaseModelProps<TMap>);
|
|
339
|
-
private defaultName;
|
|
340
|
-
/**
|
|
341
|
-
* The name of the location.
|
|
342
|
-
* If you set undefined, it will return the initial value of name.
|
|
343
|
-
*/
|
|
344
|
-
get name(): string;
|
|
345
|
-
set name(value: string | undefined);
|
|
346
|
-
private defaultDisabled;
|
|
347
|
-
/**
|
|
348
|
-
* Whether is disabled. If it is a string, it is a Pixi'VN flag name.
|
|
349
|
-
*/
|
|
350
|
-
get disabled(): boolean;
|
|
351
|
-
set disabled(value: boolean | string);
|
|
352
|
-
private defaultHidden;
|
|
353
|
-
/**
|
|
354
|
-
* Whether is hidden. If it is a string, it is a Pixi'VN flag name.
|
|
355
|
-
*/
|
|
356
|
-
get hidden(): boolean;
|
|
357
|
-
set hidden(value: boolean | string);
|
|
358
|
-
private _renderIcon?;
|
|
359
|
-
/**
|
|
360
|
-
* The function for rendering the icon of the location.
|
|
361
|
-
*/
|
|
362
|
-
get renderIcon(): ((props?: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
|
|
363
|
-
private _map;
|
|
364
|
-
/**
|
|
365
|
-
* The map where the location is.
|
|
366
|
-
*/
|
|
367
|
-
get map(): TMap;
|
|
368
|
-
/**
|
|
369
|
-
* Get the entrance room of the location.
|
|
370
|
-
* You can cast the room to a specific type that extends RoomBaseModel.
|
|
371
|
-
* @returns The entrance room or the first room if there is no entrance.
|
|
372
|
-
* @example
|
|
373
|
-
* ```typescript
|
|
374
|
-
* const entranceHome = new RoomBaseModel("entrance-home", home, { isEntrance: true })
|
|
375
|
-
* saveRoom(entranceHome)
|
|
376
|
-
* const home = new LocationBaseModel("home", map, { name: "Home" })
|
|
377
|
-
*
|
|
378
|
-
* const entrance = home.getEntrance() // entrance === entranceHome
|
|
379
|
-
* ```
|
|
380
|
-
*/
|
|
381
|
-
getEntrance<TRoom extends RoomBaseModel = RoomBaseModel>(): TRoom | undefined;
|
|
382
|
-
/**
|
|
383
|
-
* Get all rooms in the location.
|
|
384
|
-
* You can cast the rooms to a specific type that extends RoomBaseModel.
|
|
385
|
-
* @returns The rooms in the location.
|
|
386
|
-
*/
|
|
387
|
-
getRooms<TRoom extends RoomBaseModel = RoomBaseModel>(): TRoom[];
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
interface CommitmentBaseModelProps<TCharacter extends CharacterBaseModel = CharacterBaseModel, TRoom extends RoomBaseModel = RoomBaseModel> {
|
|
391
|
-
/**
|
|
392
|
-
* The name
|
|
393
|
-
* @default ""
|
|
394
|
-
*/
|
|
395
|
-
name?: string;
|
|
396
|
-
/**
|
|
397
|
-
* The hour when the commitment starts. If the commitment is not started yet, it will be hidden.
|
|
398
|
-
* If you set 3, the commitment will be hidden into hours 1 and 2, and will be shown from hour 3.
|
|
399
|
-
* @default TimeManager.minDayHours
|
|
400
|
-
*/
|
|
401
|
-
fromHour?: number;
|
|
402
|
-
/**
|
|
403
|
-
* The hour when the commitment ends. If the commitment is ended yet, it will be hidden.
|
|
404
|
-
* If you set 3, the commitment will be shown into hours 1 and 2 and will be hidden from hour 3.
|
|
405
|
-
* @default TimeManager.maxDayHours + 1
|
|
406
|
-
*/
|
|
407
|
-
toHour?: number;
|
|
408
|
-
/**
|
|
409
|
-
* The day when the commitment starts. If the commitment is not started yet, it will be hidden.
|
|
410
|
-
* If you set 3, the commitment will be hidden into days 1 and 2, and will be shown from day 3.
|
|
411
|
-
* @default undefined
|
|
412
|
-
*/
|
|
413
|
-
fromDay?: number;
|
|
414
|
-
/**
|
|
415
|
-
* The day when the commitment ends. If the commitment is ended yet, it will be deleted or hidden.
|
|
416
|
-
* If you set 3, the commitment will be shown into days 1 and 2 and will be deleted or hidden from day 3.
|
|
417
|
-
* @default undefined
|
|
418
|
-
*/
|
|
419
|
-
toDay?: number;
|
|
420
|
-
/**
|
|
421
|
-
* The image. It can be a string, an Element or a Pixi'VN Canvas Item.
|
|
422
|
-
* Or an object to manage multiple image types. For example to have a image based on time.
|
|
423
|
-
* @example
|
|
424
|
-
* ```ts
|
|
425
|
-
* {
|
|
426
|
-
* "morning": "morning-background.jpg",
|
|
427
|
-
* "afternoon": "afternoon-background.jpg",
|
|
428
|
-
* "evening": "evening-background.jpg",
|
|
429
|
-
* "night": "night-background.jpg"
|
|
430
|
-
* }
|
|
431
|
-
* ```
|
|
432
|
-
* @default undefined
|
|
433
|
-
*/
|
|
434
|
-
renderImage?: GraphicItemType | ((commitment: CommitmentBaseModel<TCharacter, TRoom>, props?: OnRenderGraphicItemProps) => GraphicItemType);
|
|
435
|
-
/**
|
|
436
|
-
* 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.
|
|
437
|
-
* @default ExecutionTypeEnum.INTERACTION
|
|
438
|
-
*/
|
|
439
|
-
executionType?: ExecutionTypeEnum;
|
|
440
|
-
/**
|
|
441
|
-
* Is a function that is called when the player interacts with the character.
|
|
442
|
-
* @param commitment
|
|
443
|
-
* @returns
|
|
444
|
-
* @default undefined
|
|
445
|
-
*/
|
|
446
|
-
onRun?: (commitment: CommitmentBaseModel) => void;
|
|
447
|
-
/**
|
|
448
|
-
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
449
|
-
* 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.
|
|
450
|
-
* @default false
|
|
451
|
-
*/
|
|
452
|
-
disabled?: boolean | string;
|
|
453
|
-
/**
|
|
454
|
-
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
455
|
-
* @default false
|
|
456
|
-
*/
|
|
457
|
-
hidden?: boolean | string;
|
|
458
|
-
}
|
|
459
471
|
/**
|
|
460
472
|
* The base model of a commitment. I suggest you extend this class to create your own commitment model.
|
|
461
473
|
* You must use the saveRoom function to save the commitment in the registered commitments.
|
|
@@ -468,7 +480,7 @@ interface CommitmentBaseModelProps<TCharacter extends CharacterBaseModel = Chara
|
|
|
468
480
|
* onRun: (commitment) => {
|
|
469
481
|
* // Do something
|
|
470
482
|
* }
|
|
471
|
-
})
|
|
483
|
+
* })
|
|
472
484
|
* saveCommitment(mcRoom)
|
|
473
485
|
* ```
|
|
474
486
|
*/
|
|
@@ -479,7 +491,7 @@ declare class CommitmentBaseModel<TCharacter extends CharacterBaseModel = Charac
|
|
|
479
491
|
* @param room The room where the commitment is.
|
|
480
492
|
* @param props The properties of the commitment.
|
|
481
493
|
*/
|
|
482
|
-
constructor(id: string, character: TCharacter | TCharacter[] | undefined, room: TRoom, props:
|
|
494
|
+
constructor(id: string, character: TCharacter | TCharacter[] | undefined, room: TRoom, props: CommitmentProps<TCharacter, TRoom>);
|
|
483
495
|
private _characters;
|
|
484
496
|
/**
|
|
485
497
|
* The character or characters that are in the commitment and so in the room.
|
|
@@ -527,17 +539,22 @@ declare class CommitmentBaseModel<TCharacter extends CharacterBaseModel = Charac
|
|
|
527
539
|
/**
|
|
528
540
|
* The function for rendering the image of the room.
|
|
529
541
|
*/
|
|
530
|
-
get renderImage(): ((props
|
|
542
|
+
get renderImage(): ((props: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
|
|
531
543
|
private _executionType;
|
|
532
544
|
/**
|
|
533
545
|
* 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.
|
|
534
546
|
*/
|
|
535
547
|
get executionType(): ExecutionTypeEnum;
|
|
548
|
+
private _renderIcon?;
|
|
549
|
+
/**
|
|
550
|
+
* The function for rendering the icon of the commitment.
|
|
551
|
+
*/
|
|
552
|
+
get renderIcon(): ((props: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
|
|
536
553
|
private _onRun?;
|
|
537
554
|
/**
|
|
538
555
|
* Is a function that is called when the player interacts with the character.
|
|
539
556
|
*/
|
|
540
|
-
onRun(): void;
|
|
557
|
+
onRun(): undefined | ((props: OnRunProps) => void);
|
|
541
558
|
private defaultDisabled;
|
|
542
559
|
/**
|
|
543
560
|
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
@@ -557,4 +574,4 @@ declare class CommitmentBaseModel<TCharacter extends CharacterBaseModel = Charac
|
|
|
557
574
|
isExpired(): boolean;
|
|
558
575
|
}
|
|
559
576
|
|
|
560
|
-
export { ActivityRoom as A, CommitmentBaseModel as C, LocationBaseModel as L, MapBaseModel as M, RoomBaseModel as R, type
|
|
577
|
+
export { ActivityRoom as A, CommitmentBaseModel as C, LocationBaseModel as L, MapBaseModel as M, RoomBaseModel as R, type CommitmentProps as a, type LocationProps as b, type MapProps as c, type RoomProps as d, ROOM_CATEGORY as e };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import Goal from './classes/quest/Goal.mjs';
|
|
2
1
|
import { StoredClassModel } from '@drincs/pixi-vn';
|
|
2
|
+
import Goal from './classes/quest/Goal.mjs';
|
|
3
|
+
import QuestProps from './interface/quest/QuestProps.mjs';
|
|
3
4
|
|
|
4
5
|
type QuestsRequiredType<TQuest extends QuestBaseModel = QuestBaseModel> = {
|
|
5
6
|
quest: TQuest;
|
|
6
7
|
stageNumber: number;
|
|
7
8
|
} | TQuest;
|
|
8
9
|
|
|
9
|
-
interface
|
|
10
|
+
interface StageProps {
|
|
10
11
|
goals?: Goal[];
|
|
11
12
|
name?: string;
|
|
12
13
|
description?: string;
|
|
@@ -19,8 +20,9 @@ interface StageBaseModelProps {
|
|
|
19
20
|
onStart: () => void;
|
|
20
21
|
onEnd: () => void;
|
|
21
22
|
}
|
|
23
|
+
|
|
22
24
|
declare class StageBaseModel extends StoredClassModel {
|
|
23
|
-
constructor(id: string, props:
|
|
25
|
+
constructor(id: string, props: StageProps);
|
|
24
26
|
private _completed;
|
|
25
27
|
get completed(): boolean;
|
|
26
28
|
private _active;
|
|
@@ -50,15 +52,8 @@ declare class StageBaseModel extends StoredClassModel {
|
|
|
50
52
|
get onEnd(): () => void;
|
|
51
53
|
}
|
|
52
54
|
|
|
53
|
-
interface QuestBaseModelProps {
|
|
54
|
-
name?: string;
|
|
55
|
-
description?: string;
|
|
56
|
-
icon?: string;
|
|
57
|
-
image?: string;
|
|
58
|
-
isInDevelopment?: boolean;
|
|
59
|
-
}
|
|
60
55
|
declare class QuestBaseModel<TStage extends StageBaseModel = StageBaseModel> extends StoredClassModel {
|
|
61
|
-
constructor(id: string, stages: TStage[], props:
|
|
56
|
+
constructor(id: string, stages: TStage[], props: QuestProps);
|
|
62
57
|
private _stages;
|
|
63
58
|
get stages(): TStage[];
|
|
64
59
|
private _name;
|
|
@@ -73,4 +68,4 @@ declare class QuestBaseModel<TStage extends StageBaseModel = StageBaseModel> ext
|
|
|
73
68
|
get isInDevelopment(): boolean;
|
|
74
69
|
}
|
|
75
70
|
|
|
76
|
-
export { QuestBaseModel as Q, StageBaseModel as S, type
|
|
71
|
+
export { QuestBaseModel as Q, StageBaseModel as S, type StageProps as a, type QuestsRequiredType as b };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import Goal from './classes/quest/Goal.js';
|
|
2
1
|
import { StoredClassModel } from '@drincs/pixi-vn';
|
|
2
|
+
import Goal from './classes/quest/Goal.js';
|
|
3
|
+
import QuestProps from './interface/quest/QuestProps.js';
|
|
3
4
|
|
|
4
5
|
type QuestsRequiredType<TQuest extends QuestBaseModel = QuestBaseModel> = {
|
|
5
6
|
quest: TQuest;
|
|
6
7
|
stageNumber: number;
|
|
7
8
|
} | TQuest;
|
|
8
9
|
|
|
9
|
-
interface
|
|
10
|
+
interface StageProps {
|
|
10
11
|
goals?: Goal[];
|
|
11
12
|
name?: string;
|
|
12
13
|
description?: string;
|
|
@@ -19,8 +20,9 @@ interface StageBaseModelProps {
|
|
|
19
20
|
onStart: () => void;
|
|
20
21
|
onEnd: () => void;
|
|
21
22
|
}
|
|
23
|
+
|
|
22
24
|
declare class StageBaseModel extends StoredClassModel {
|
|
23
|
-
constructor(id: string, props:
|
|
25
|
+
constructor(id: string, props: StageProps);
|
|
24
26
|
private _completed;
|
|
25
27
|
get completed(): boolean;
|
|
26
28
|
private _active;
|
|
@@ -50,15 +52,8 @@ declare class StageBaseModel extends StoredClassModel {
|
|
|
50
52
|
get onEnd(): () => void;
|
|
51
53
|
}
|
|
52
54
|
|
|
53
|
-
interface QuestBaseModelProps {
|
|
54
|
-
name?: string;
|
|
55
|
-
description?: string;
|
|
56
|
-
icon?: string;
|
|
57
|
-
image?: string;
|
|
58
|
-
isInDevelopment?: boolean;
|
|
59
|
-
}
|
|
60
55
|
declare class QuestBaseModel<TStage extends StageBaseModel = StageBaseModel> extends StoredClassModel {
|
|
61
|
-
constructor(id: string, stages: TStage[], props:
|
|
56
|
+
constructor(id: string, stages: TStage[], props: QuestProps);
|
|
62
57
|
private _stages;
|
|
63
58
|
get stages(): TStage[];
|
|
64
59
|
private _name;
|
|
@@ -73,4 +68,4 @@ declare class QuestBaseModel<TStage extends StageBaseModel = StageBaseModel> ext
|
|
|
73
68
|
get isInDevelopment(): boolean;
|
|
74
69
|
}
|
|
75
70
|
|
|
76
|
-
export { QuestBaseModel as Q, StageBaseModel as S, type
|
|
71
|
+
export { QuestBaseModel as Q, StageBaseModel as S, type StageProps as a, type QuestsRequiredType as b };
|