@drincs/nqtr 0.1.1 → 0.1.2
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/classes/Activity.d.mts +199 -0
- package/dist/classes/Activity.d.ts +199 -0
- package/dist/classes/Activity.js +508 -0
- package/dist/classes/Activity.js.map +1 -0
- package/dist/classes/Activity.mjs +503 -0
- package/dist/classes/Activity.mjs.map +1 -0
- package/dist/classes/Commitment.d.mts +6 -0
- package/dist/classes/Commitment.d.ts +6 -0
- package/dist/classes/Commitment.js +402 -0
- package/dist/classes/Commitment.js.map +1 -0
- package/dist/classes/Commitment.mjs +400 -0
- package/dist/classes/Commitment.mjs.map +1 -0
- package/dist/classes/index.d.mts +6 -0
- package/dist/classes/index.d.ts +6 -0
- package/dist/classes/index.js +520 -0
- package/dist/classes/index.js.map +1 -0
- package/dist/classes/index.mjs +517 -0
- package/dist/classes/index.mjs.map +1 -0
- package/dist/classes/navigation/ActivityRoom.d.mts +6 -0
- package/dist/classes/navigation/ActivityRoom.d.ts +6 -0
- package/dist/classes/navigation/ActivityRoom.js +435 -0
- package/dist/classes/navigation/ActivityRoom.js.map +1 -0
- package/dist/classes/navigation/ActivityRoom.mjs +433 -0
- package/dist/classes/navigation/ActivityRoom.mjs.map +1 -0
- package/dist/classes/navigation/Location.d.mts +6 -0
- package/dist/classes/navigation/Location.d.ts +6 -0
- package/dist/classes/navigation/Location.js +110 -0
- package/dist/classes/navigation/Location.js.map +1 -0
- package/dist/classes/navigation/Location.mjs +108 -0
- package/dist/classes/navigation/Location.mjs.map +1 -0
- package/dist/classes/navigation/Map.d.mts +6 -0
- package/dist/classes/navigation/Map.d.ts +6 -0
- package/dist/classes/navigation/Map.js +109 -0
- package/dist/classes/navigation/Map.js.map +1 -0
- package/dist/classes/navigation/Map.mjs +107 -0
- package/dist/classes/navigation/Map.mjs.map +1 -0
- package/dist/classes/navigation/Room.d.mts +6 -0
- package/dist/classes/navigation/Room.d.ts +6 -0
- package/dist/classes/navigation/Room.js +750 -0
- package/dist/classes/navigation/Room.js.map +1 -0
- package/dist/classes/navigation/Room.mjs +745 -0
- package/dist/classes/navigation/Room.mjs.map +1 -0
- package/dist/classes/navigation/index.d.mts +6 -0
- package/dist/classes/navigation/index.d.ts +6 -0
- package/dist/classes/navigation/index.js +945 -0
- package/dist/classes/navigation/index.js.map +1 -0
- package/dist/classes/navigation/index.mjs +941 -0
- package/dist/classes/navigation/index.mjs.map +1 -0
- package/dist/classes/quest/Goal.d.mts +23 -0
- package/dist/classes/quest/Goal.d.ts +23 -0
- package/dist/classes/quest/Goal.js +33 -0
- package/dist/classes/quest/Goal.js.map +1 -0
- package/dist/classes/quest/Goal.mjs +31 -0
- package/dist/classes/quest/Goal.mjs.map +1 -0
- package/dist/classes/quest/Quest.d.mts +3 -0
- package/dist/classes/quest/Quest.d.ts +3 -0
- package/dist/classes/quest/Quest.js +39 -0
- package/dist/classes/quest/Quest.js.map +1 -0
- package/dist/classes/quest/Quest.mjs +37 -0
- package/dist/classes/quest/Quest.mjs.map +1 -0
- package/dist/classes/quest/Stage.d.mts +3 -0
- package/dist/classes/quest/Stage.d.ts +3 -0
- package/dist/classes/quest/Stage.js +105 -0
- package/dist/classes/quest/Stage.js.map +1 -0
- package/dist/classes/quest/Stage.mjs +103 -0
- package/dist/classes/quest/Stage.mjs.map +1 -0
- package/dist/classes/quest/index.d.mts +3 -0
- package/dist/classes/quest/index.d.ts +3 -0
- package/dist/classes/quest/index.js +133 -0
- package/dist/classes/quest/index.js.map +1 -0
- package/dist/classes/quest/index.mjs +129 -0
- package/dist/classes/quest/index.mjs.map +1 -0
- package/dist/decorators/ActivityDecorator.d.mts +12 -0
- package/dist/decorators/ActivityDecorator.d.ts +12 -0
- package/dist/decorators/ActivityDecorator.js +33 -0
- package/dist/decorators/ActivityDecorator.js.map +1 -0
- package/dist/decorators/ActivityDecorator.mjs +29 -0
- package/dist/decorators/ActivityDecorator.mjs.map +1 -0
- package/dist/decorators/CommitmentDecorator.d.mts +21 -0
- package/dist/decorators/CommitmentDecorator.d.ts +21 -0
- package/dist/decorators/CommitmentDecorator.js +77 -0
- package/dist/decorators/CommitmentDecorator.js.map +1 -0
- package/dist/decorators/CommitmentDecorator.mjs +68 -0
- package/dist/decorators/CommitmentDecorator.mjs.map +1 -0
- package/dist/decorators/RoomDecorator.d.mts +46 -0
- package/dist/decorators/RoomDecorator.d.ts +46 -0
- package/dist/decorators/RoomDecorator.js +57 -0
- package/dist/decorators/RoomDecorator.js.map +1 -0
- package/dist/decorators/RoomDecorator.mjs +49 -0
- package/dist/decorators/RoomDecorator.mjs.map +1 -0
- package/dist/decorators/index.d.mts +9 -0
- package/dist/decorators/index.d.ts +9 -0
- package/dist/decorators/index.js +145 -0
- package/dist/decorators/index.js.map +1 -0
- package/dist/decorators/index.mjs +132 -0
- package/dist/decorators/index.mjs.map +1 -0
- package/dist/enums/ExecutionTypeEnum.d.mts +6 -0
- package/dist/enums/ExecutionTypeEnum.d.ts +6 -0
- package/dist/enums/ExecutionTypeEnum.js +12 -0
- package/dist/enums/ExecutionTypeEnum.js.map +1 -0
- package/dist/enums/ExecutionTypeEnum.mjs +10 -0
- package/dist/enums/ExecutionTypeEnum.mjs.map +1 -0
- package/dist/enums/index.d.mts +1 -0
- package/dist/enums/index.d.ts +1 -0
- package/dist/enums/index.js +12 -0
- package/dist/enums/index.js.map +1 -0
- package/dist/enums/index.mjs +10 -0
- package/dist/enums/index.mjs.map +1 -0
- package/dist/functions/ActivityFunctions.d.mts +11 -0
- package/dist/functions/ActivityFunctions.d.ts +11 -0
- package/dist/functions/ActivityFunctions.js +54 -0
- package/dist/functions/ActivityFunctions.js.map +1 -0
- package/dist/functions/ActivityFunctions.mjs +51 -0
- package/dist/functions/ActivityFunctions.mjs.map +1 -0
- package/dist/functions/NavigationFunctions.d.mts +13 -0
- package/dist/functions/NavigationFunctions.d.ts +13 -0
- package/dist/functions/NavigationFunctions.js +173 -0
- package/dist/functions/NavigationFunctions.js.map +1 -0
- package/dist/functions/NavigationFunctions.mjs +168 -0
- package/dist/functions/NavigationFunctions.mjs.map +1 -0
- package/dist/functions/RoutineFunctions.d.mts +12 -0
- package/dist/functions/RoutineFunctions.d.ts +12 -0
- package/dist/functions/RoutineFunctions.js +87 -0
- package/dist/functions/RoutineFunctions.js.map +1 -0
- package/dist/functions/RoutineFunctions.mjs +83 -0
- package/dist/functions/RoutineFunctions.mjs.map +1 -0
- package/dist/functions/index.d.mts +9 -0
- package/dist/functions/index.d.ts +9 -0
- package/dist/functions/index.js +264 -0
- package/dist/functions/index.js.map +1 -0
- package/dist/functions/index.mjs +254 -0
- package/dist/functions/index.mjs.map +1 -0
- package/dist/index-BjOzVDyw.d.ts +76 -0
- package/dist/index-BvCfRbJB.d.mts +564 -0
- package/dist/index-Ci6Aw7YE.d.ts +564 -0
- package/dist/index-gJ26gdgL.d.mts +76 -0
- package/dist/index.d.mts +16 -1031
- package/dist/index.d.ts +16 -1031
- package/dist/index.js +83 -154
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +31 -80
- package/dist/index.mjs.map +1 -1
- package/dist/managers/TimeManager.d.mts +84 -0
- package/dist/managers/TimeManager.d.ts +84 -0
- package/dist/managers/TimeManager.js +251 -0
- package/dist/managers/TimeManager.js.map +1 -0
- package/dist/managers/TimeManager.mjs +249 -0
- package/dist/managers/TimeManager.mjs.map +1 -0
- package/dist/managers/index.d.mts +2 -0
- package/dist/managers/index.d.ts +2 -0
- package/dist/managers/index.js +251 -0
- package/dist/managers/index.js.map +1 -0
- package/dist/managers/index.mjs +249 -0
- package/dist/managers/index.mjs.map +1 -0
- package/dist/override/OnRunActivityProps.d.mts +19 -0
- package/dist/override/OnRunActivityProps.d.ts +19 -0
- package/dist/override/OnRunActivityProps.js +4 -0
- package/dist/override/OnRunActivityProps.js.map +1 -0
- package/dist/override/OnRunActivityProps.mjs +3 -0
- package/dist/override/OnRunActivityProps.mjs.map +1 -0
- package/dist/override/index.d.mts +1 -0
- package/dist/override/index.d.ts +1 -0
- package/dist/override/index.js +4 -0
- package/dist/override/index.js.map +1 -0
- package/dist/override/index.mjs +3 -0
- package/dist/override/index.mjs.map +1 -0
- package/dist/types/GraphicItem.d.mts +5 -0
- package/dist/types/GraphicItem.d.ts +5 -0
- package/dist/types/GraphicItem.js +4 -0
- package/dist/types/GraphicItem.js.map +1 -0
- package/dist/types/GraphicItem.mjs +3 -0
- package/dist/types/GraphicItem.mjs.map +1 -0
- package/dist/types/QuestsRequired.d.mts +3 -0
- package/dist/types/QuestsRequired.d.ts +3 -0
- package/dist/types/QuestsRequired.js +4 -0
- package/dist/types/QuestsRequired.js.map +1 -0
- package/dist/types/QuestsRequired.mjs +3 -0
- package/dist/types/QuestsRequired.mjs.map +1 -0
- package/dist/types/TimeSettings.d.mts +58 -0
- package/dist/types/TimeSettings.d.ts +58 -0
- package/dist/types/TimeSettings.js +4 -0
- package/dist/types/TimeSettings.js.map +1 -0
- package/dist/types/TimeSettings.mjs +3 -0
- package/dist/types/TimeSettings.mjs.map +1 -0
- package/dist/types/index.d.mts +4 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.js +4 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/index.mjs +3 -0
- package/dist/types/index.mjs.map +1 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,1031 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* The hour when the activity ends. If the activity is ended yet, it will be hidden.
|
|
19
|
-
* If you set 3, the activity will be shown into hours 1 and 2 and will be hidden from hour 3.
|
|
20
|
-
* @default TimeManager.maxDayHours + 1
|
|
21
|
-
*/
|
|
22
|
-
toHour?: number;
|
|
23
|
-
/**
|
|
24
|
-
* The day when the activity starts. If the activity is not started yet, it will be hidden.
|
|
25
|
-
* If you set 3, the activity will be hidden into days 1 and 2, and will be shown from day 3.
|
|
26
|
-
* @default undefined
|
|
27
|
-
*/
|
|
28
|
-
fromDay?: number;
|
|
29
|
-
/**
|
|
30
|
-
* The day when the activity ends. If the activity is ended yet, it will be deleted or hidden.
|
|
31
|
-
* If you set 3, the activity will be shown into days 1 and 2 and will be deleted or hidden from day 3.
|
|
32
|
-
* @default undefined
|
|
33
|
-
*/
|
|
34
|
-
toDay?: number;
|
|
35
|
-
/**
|
|
36
|
-
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
37
|
-
* @default false
|
|
38
|
-
*/
|
|
39
|
-
disabled?: boolean | string;
|
|
40
|
-
/**
|
|
41
|
-
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
42
|
-
* @default false
|
|
43
|
-
*/
|
|
44
|
-
hidden?: boolean | string;
|
|
45
|
-
/**
|
|
46
|
-
* The icon element. Can be a string or an Element or a Pixi'VN CanvasItem
|
|
47
|
-
* @default undefined
|
|
48
|
-
*/
|
|
49
|
-
icon?: GraphicItemType;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* The function that is called when the activity is runned.
|
|
53
|
-
*/
|
|
54
|
-
type OnRunActivityEvent<T> = (activity: T, yourParams?: {
|
|
55
|
-
[key: string]: any;
|
|
56
|
-
}) => void;
|
|
57
|
-
declare abstract class ActivityStoredAbstract {
|
|
58
|
-
/**
|
|
59
|
-
* @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.
|
|
60
|
-
* @param props The activity properties.
|
|
61
|
-
*/
|
|
62
|
-
constructor(onRun: OnRunActivityEvent<ActivityStoredAbstract>, props: ActivityProps);
|
|
63
|
-
abstract setStorageProperty<T>(propertyName: string, value: T | undefined): void;
|
|
64
|
-
abstract getStorageProperty<T>(propertyName: string): T | undefined;
|
|
65
|
-
abstract get id(): string;
|
|
66
|
-
private defaultName?;
|
|
67
|
-
/**
|
|
68
|
-
* The name
|
|
69
|
-
*/
|
|
70
|
-
get name(): string;
|
|
71
|
-
set name(value: string | undefined);
|
|
72
|
-
private defaultFromHour?;
|
|
73
|
-
/**
|
|
74
|
-
* The hour when the activity starts. If the activity is not started yet, it will be hidden.
|
|
75
|
-
*/
|
|
76
|
-
get fromHour(): number;
|
|
77
|
-
set fromHour(value: number | undefined);
|
|
78
|
-
private defaultToHour?;
|
|
79
|
-
/**
|
|
80
|
-
* The hour when the activity ends. If the activity is ended yet, it will be hidden.
|
|
81
|
-
*/
|
|
82
|
-
get toHour(): number;
|
|
83
|
-
set toHour(value: number | undefined);
|
|
84
|
-
private defaultFromDay?;
|
|
85
|
-
/**
|
|
86
|
-
* The day when the activity starts. If the activity is not started yet, it will be hidden.
|
|
87
|
-
*/
|
|
88
|
-
get fromDay(): number | undefined;
|
|
89
|
-
set fromDay(value: number | undefined);
|
|
90
|
-
private defaultToDay?;
|
|
91
|
-
/**
|
|
92
|
-
* The day when the activity ends. If the activity is ended yet, it will be deleted or hidden.
|
|
93
|
-
*/
|
|
94
|
-
get toDay(): number | undefined;
|
|
95
|
-
set toDay(value: number | undefined);
|
|
96
|
-
private defaultDisabled;
|
|
97
|
-
/**
|
|
98
|
-
* Whether is disabled.
|
|
99
|
-
*/
|
|
100
|
-
get disabled(): boolean;
|
|
101
|
-
set disabled(value: boolean | string);
|
|
102
|
-
private defaultHidden;
|
|
103
|
-
/**
|
|
104
|
-
* Whether is hidden. If the activity is not started yet, it will be hidden.
|
|
105
|
-
*/
|
|
106
|
-
get hidden(): boolean;
|
|
107
|
-
set hidden(value: boolean | string);
|
|
108
|
-
private _icon?;
|
|
109
|
-
/**
|
|
110
|
-
* The icon element.
|
|
111
|
-
*/
|
|
112
|
-
get icon(): GraphicItemType | undefined;
|
|
113
|
-
private _onRun;
|
|
114
|
-
/**
|
|
115
|
-
* The function that is called when the activity is runned.
|
|
116
|
-
*/
|
|
117
|
-
get onRun(): () => void;
|
|
118
|
-
/**
|
|
119
|
-
* Whether the activity is a deadline.
|
|
120
|
-
* @returns Whether the activity is a deadline.
|
|
121
|
-
*/
|
|
122
|
-
isExpired(): boolean;
|
|
123
|
-
/**
|
|
124
|
-
* Export the activity properties.
|
|
125
|
-
* @returns The activity properties.
|
|
126
|
-
*/
|
|
127
|
-
export(): ActivityProps;
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* The activity model.
|
|
131
|
-
*/
|
|
132
|
-
declare class ActivityModel {
|
|
133
|
-
/**
|
|
134
|
-
* @param id The activity id, that must be unique.
|
|
135
|
-
* @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.
|
|
136
|
-
* @param props The activity properties.
|
|
137
|
-
*/
|
|
138
|
-
constructor(id: string, onRun: OnRunActivityEvent<ActivityModel>, props: ActivityProps);
|
|
139
|
-
private _id;
|
|
140
|
-
/**
|
|
141
|
-
* The activity id, that is unique.
|
|
142
|
-
*/
|
|
143
|
-
get id(): string;
|
|
144
|
-
private _name?;
|
|
145
|
-
/**
|
|
146
|
-
* The name
|
|
147
|
-
*/
|
|
148
|
-
get name(): string | undefined;
|
|
149
|
-
private _fromHour?;
|
|
150
|
-
/**
|
|
151
|
-
* The hour when the activity starts. If the activity is not started yet, it will be hidden.
|
|
152
|
-
*/
|
|
153
|
-
get fromHour(): number | undefined;
|
|
154
|
-
private _toHour?;
|
|
155
|
-
/**
|
|
156
|
-
* The hour when the activity ends. If the activity is ended yet, it will be hidden.
|
|
157
|
-
*/
|
|
158
|
-
get toHour(): number | undefined;
|
|
159
|
-
private _fromDay?;
|
|
160
|
-
/**
|
|
161
|
-
* The day when the activity starts. If the activity is not started yet, it will be hidden.
|
|
162
|
-
*/
|
|
163
|
-
get fromDay(): number | undefined;
|
|
164
|
-
private _toDay?;
|
|
165
|
-
/**
|
|
166
|
-
* The day when the activity ends. If the activity is ended yet, it will be deleted or hidden.
|
|
167
|
-
*/
|
|
168
|
-
get toDay(): number | undefined;
|
|
169
|
-
private _disabled?;
|
|
170
|
-
/**
|
|
171
|
-
* Whether is disabled.
|
|
172
|
-
*/
|
|
173
|
-
get disabled(): boolean | undefined;
|
|
174
|
-
private _hidden;
|
|
175
|
-
/**
|
|
176
|
-
* Whether is hidden. If the activity is not started yet, it will be hidden.
|
|
177
|
-
*/
|
|
178
|
-
get hidden(): boolean;
|
|
179
|
-
private _icon?;
|
|
180
|
-
/**
|
|
181
|
-
* The icon element.
|
|
182
|
-
*/
|
|
183
|
-
get icon(): GraphicItemType | undefined;
|
|
184
|
-
private _onRun;
|
|
185
|
-
/**
|
|
186
|
-
* The function that is called when the activity is runned.
|
|
187
|
-
*/
|
|
188
|
-
get onRun(): () => void;
|
|
189
|
-
/**
|
|
190
|
-
* Whether the activity is a deadline.
|
|
191
|
-
* @returns Whether the activity is a deadline.
|
|
192
|
-
*/
|
|
193
|
-
isDeadline(): boolean;
|
|
194
|
-
/**
|
|
195
|
-
* Export the activity properties.
|
|
196
|
-
* @returns The activity properties.
|
|
197
|
-
*/
|
|
198
|
-
export(): ActivityProps;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
declare enum ExecutionTypeEnum {
|
|
202
|
-
AUTOMATIC = "automatic",
|
|
203
|
-
INTERACTION = "interaction"
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
interface MapBaseModelProps<TMap extends MapBaseModel = MapBaseModel> {
|
|
207
|
-
/**
|
|
208
|
-
* The name
|
|
209
|
-
* @default ""
|
|
210
|
-
*/
|
|
211
|
-
name?: string;
|
|
212
|
-
/**
|
|
213
|
-
* The image. It can be a string, an Element or a Pixi'VN Canvas Item.
|
|
214
|
-
* Or an object to manage multiple image types. For example to have a image based on time.
|
|
215
|
-
* @example
|
|
216
|
-
* ```ts
|
|
217
|
-
* {
|
|
218
|
-
* "morning": "morning-background.jpg",
|
|
219
|
-
* "afternoon": "afternoon-background.jpg",
|
|
220
|
-
* "evening": "evening-background.jpg",
|
|
221
|
-
* "night": "night-background.jpg"
|
|
222
|
-
* }
|
|
223
|
-
* ```
|
|
224
|
-
* @default undefined
|
|
225
|
-
*/
|
|
226
|
-
image?: GraphicItemType | Record<any, GraphicItemType> | object;
|
|
227
|
-
/**
|
|
228
|
-
* The neighboring maps that are available in this map.
|
|
229
|
-
* @example
|
|
230
|
-
* ```ts
|
|
231
|
-
* {
|
|
232
|
-
* "north": "atlanta_map_id",
|
|
233
|
-
* "south": "miami_map_id",
|
|
234
|
-
* "east": "new_york_map_id",
|
|
235
|
-
* "west": "los_angeles_map_id"
|
|
236
|
-
* }
|
|
237
|
-
* ```
|
|
238
|
-
* @default {}
|
|
239
|
-
*/
|
|
240
|
-
neighboringMaps?: {
|
|
241
|
-
[key: string]: string;
|
|
242
|
-
};
|
|
243
|
-
/**
|
|
244
|
-
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
245
|
-
* @default false
|
|
246
|
-
*/
|
|
247
|
-
disabled?: boolean | string;
|
|
248
|
-
/**
|
|
249
|
-
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
250
|
-
* @default false
|
|
251
|
-
*/
|
|
252
|
-
hidden?: boolean | string;
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* The base model of a map. I suggest you extend this class to create your own map model.
|
|
256
|
-
* @example
|
|
257
|
-
* ```typescript
|
|
258
|
-
* export const mainMap = new MapBaseModel('main_map', {
|
|
259
|
-
* name: 'Main Map',
|
|
260
|
-
* image: "https://image.jpg",
|
|
261
|
-
* neighboringMaps: {
|
|
262
|
-
* "north": northMap,
|
|
263
|
-
* "south": southMap,
|
|
264
|
-
* "east": eastMap,
|
|
265
|
-
* "west": westMap
|
|
266
|
-
* }
|
|
267
|
-
* });
|
|
268
|
-
* ```
|
|
269
|
-
*/
|
|
270
|
-
declare class MapBaseModel extends StoredClassModel {
|
|
271
|
-
/**
|
|
272
|
-
* @param id The id of the map, it must be unique.
|
|
273
|
-
* @param props The properties of the map.
|
|
274
|
-
*/
|
|
275
|
-
constructor(id: string, props?: MapBaseModelProps);
|
|
276
|
-
private defaultName;
|
|
277
|
-
/**
|
|
278
|
-
* The name of the map.
|
|
279
|
-
* If you set undefined, it will return the initial value of name.
|
|
280
|
-
*/
|
|
281
|
-
get name(): string;
|
|
282
|
-
set name(value: string | undefined);
|
|
283
|
-
private defaultImage?;
|
|
284
|
-
/**
|
|
285
|
-
* The image of the map. It can be a string, an Element or a Pixi'VN Canvas Item.
|
|
286
|
-
* If you set undefined, it will return the initial value of image.
|
|
287
|
-
*/
|
|
288
|
-
get image(): GraphicItemType | Record<any, GraphicItemType> | object | undefined;
|
|
289
|
-
set image(value: GraphicItemType | Record<any, GraphicItemType> | object | undefined);
|
|
290
|
-
private defaultDisabled;
|
|
291
|
-
/**
|
|
292
|
-
* Whether is disabled. If it is a string, it is a Pixi'VN flag name.
|
|
293
|
-
*/
|
|
294
|
-
get disabled(): boolean;
|
|
295
|
-
set disabled(value: boolean | string);
|
|
296
|
-
private defaultHidden;
|
|
297
|
-
/**
|
|
298
|
-
* Whether is hidden. If it is a string, it is a Pixi'VN flag name.
|
|
299
|
-
*/
|
|
300
|
-
get hidden(): boolean;
|
|
301
|
-
set hidden(value: boolean | string);
|
|
302
|
-
private _neighboringMaps?;
|
|
303
|
-
/**
|
|
304
|
-
* The neighboring maps that are available in this map.
|
|
305
|
-
*/
|
|
306
|
-
get neighboringMaps(): {
|
|
307
|
-
[key: string]: MapBaseModel;
|
|
308
|
-
};
|
|
309
|
-
set neighboringMaps(value: {
|
|
310
|
-
[key: string]: MapBaseModel;
|
|
311
|
-
} | undefined);
|
|
312
|
-
/**
|
|
313
|
-
* Get all locations in the map.
|
|
314
|
-
* @returns The locations in the map.
|
|
315
|
-
*/
|
|
316
|
-
getLocations<TLocation extends LocationBaseModel = LocationBaseModel>(): TLocation[];
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
/**
|
|
320
|
-
* The activity generated by the room.
|
|
321
|
-
*/
|
|
322
|
-
declare class ActivityRoom<TRoom extends RoomBaseModel = RoomBaseModel> extends ActivityStoredAbstract {
|
|
323
|
-
constructor(id: string, room: TRoom, onRun: OnRunActivityEvent<ActivityStoredAbstract>, props: ActivityProps);
|
|
324
|
-
setStorageProperty<T>(_: string, __: T | undefined): void;
|
|
325
|
-
getStorageProperty<T>(propertyName: string): T | undefined;
|
|
326
|
-
private _id;
|
|
327
|
-
get id(): string;
|
|
328
|
-
/**
|
|
329
|
-
* The room where the activity is.
|
|
330
|
-
*/
|
|
331
|
-
private _room;
|
|
332
|
-
get room(): TRoom;
|
|
333
|
-
export(): object;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
interface RoomBaseModelProps {
|
|
337
|
-
/**
|
|
338
|
-
* The name
|
|
339
|
-
* @default ""
|
|
340
|
-
*/
|
|
341
|
-
name?: string;
|
|
342
|
-
/**
|
|
343
|
-
* The image. It can be a string, an Element or a Pixi'VN Canvas Item.
|
|
344
|
-
* Or an object to manage multiple image types. For example to have a image based on time.
|
|
345
|
-
* @example
|
|
346
|
-
* ```ts
|
|
347
|
-
* {
|
|
348
|
-
* "morning": "morning-background.jpg",
|
|
349
|
-
* "afternoon": "afternoon-background.jpg",
|
|
350
|
-
* "evening": "evening-background.jpg",
|
|
351
|
-
* "night": "night-background.jpg"
|
|
352
|
-
* }
|
|
353
|
-
* ```
|
|
354
|
-
* @default undefined
|
|
355
|
-
*/
|
|
356
|
-
image?: GraphicItemType | Record<any, GraphicItemType> | object;
|
|
357
|
-
/**
|
|
358
|
-
* The activities that are available in this room.
|
|
359
|
-
* @default []
|
|
360
|
-
*/
|
|
361
|
-
defaultActivities?: ActivityModel[];
|
|
362
|
-
/**
|
|
363
|
-
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
364
|
-
* @default false
|
|
365
|
-
*/
|
|
366
|
-
disabled?: boolean | string;
|
|
367
|
-
/**
|
|
368
|
-
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
369
|
-
* @default false
|
|
370
|
-
*/
|
|
371
|
-
hidden?: boolean | string;
|
|
372
|
-
/**
|
|
373
|
-
* The icon element. Can be a string or an Element or a Pixi'VN CanvasItem
|
|
374
|
-
* @default undefined
|
|
375
|
-
*/
|
|
376
|
-
icon?: GraphicItemType;
|
|
377
|
-
/**
|
|
378
|
-
* Whether is an entrance room, so when the player enters in the location, it will be the first room to be shown.
|
|
379
|
-
* @default false
|
|
380
|
-
*/
|
|
381
|
-
isEntrance?: boolean;
|
|
382
|
-
}
|
|
383
|
-
/**
|
|
384
|
-
* The base model of a room. I suggest you extend this class to create your own room model.
|
|
385
|
-
* You must use the saveRoom function to save the room in the registered rooms.
|
|
386
|
-
* @example
|
|
387
|
-
* ```ts
|
|
388
|
-
* export const mcRoom = new RoomBaseModel('mc_room', mcHome, {
|
|
389
|
-
* name: "MC Room",
|
|
390
|
-
* icon: "https://icon.jpg",
|
|
391
|
-
* image: "https://image.jpg",
|
|
392
|
-
* isEntrance: false,
|
|
393
|
-
* })
|
|
394
|
-
* saveRoom(mcRoom)
|
|
395
|
-
* ```
|
|
396
|
-
*/
|
|
397
|
-
declare class RoomBaseModel<TLocation extends LocationBaseModel = LocationBaseModel> extends StoredClassModel {
|
|
398
|
-
/**
|
|
399
|
-
* @param id The id of the room, it must be unique.
|
|
400
|
-
* @param location The location where the room is.
|
|
401
|
-
* @param props The properties of the room.
|
|
402
|
-
*/
|
|
403
|
-
constructor(id: string, location: TLocation, props?: RoomBaseModelProps);
|
|
404
|
-
private _location;
|
|
405
|
-
/**
|
|
406
|
-
* The location where the room is.
|
|
407
|
-
*/
|
|
408
|
-
get location(): TLocation;
|
|
409
|
-
private _isEntrance?;
|
|
410
|
-
/**
|
|
411
|
-
* Whether is an entrance room, so when the player enters in the location, it will be the first room to be shown.
|
|
412
|
-
*/
|
|
413
|
-
get isEntrance(): boolean;
|
|
414
|
-
private defaultName;
|
|
415
|
-
/**
|
|
416
|
-
* The name.
|
|
417
|
-
* If you set undefined, it will return the initial value of name.
|
|
418
|
-
*/
|
|
419
|
-
get name(): string;
|
|
420
|
-
set name(value: string | undefined);
|
|
421
|
-
private defaultImage?;
|
|
422
|
-
/**
|
|
423
|
-
* The image. It can be a string, an Element or a Pixi'VN Canvas Item.
|
|
424
|
-
* If you set undefined, it will return the initial value of image.
|
|
425
|
-
*/
|
|
426
|
-
get image(): GraphicItemType | Record<any, GraphicItemType> | object | undefined;
|
|
427
|
-
set image(value: GraphicItemType | Record<any, GraphicItemType> | object | undefined);
|
|
428
|
-
private defaultActivityIds;
|
|
429
|
-
/**
|
|
430
|
-
* The activities that are available in this room.
|
|
431
|
-
*/
|
|
432
|
-
get defaultActivities(): ActivityRoom<this>[];
|
|
433
|
-
private get activityIds();
|
|
434
|
-
/**
|
|
435
|
-
* The activities that are available in this room.
|
|
436
|
-
*/
|
|
437
|
-
get activities(): ActivityRoom<this>[];
|
|
438
|
-
/**
|
|
439
|
-
* Get the memory of an activity. This function can be used into olther libraries to get the memory of the activity.
|
|
440
|
-
* @param id The id of the activity.
|
|
441
|
-
* @returns The memory of the activity.
|
|
442
|
-
*/
|
|
443
|
-
getActivityMemory(id: string): object | undefined;
|
|
444
|
-
/**
|
|
445
|
-
* Get the activity by id.
|
|
446
|
-
* @param id The id of the activity.
|
|
447
|
-
* @returns The room activity.
|
|
448
|
-
*/
|
|
449
|
-
getActivity(id: string): ActivityRoom<this> | undefined;
|
|
450
|
-
/**
|
|
451
|
-
* Set the memory of an activity. This function can be used into olther libraries to set the memory of the activity.
|
|
452
|
-
* @param id The id of the activity.
|
|
453
|
-
* @param memory The memory of the activity.
|
|
454
|
-
*/
|
|
455
|
-
setActivity(activity: ActivityRoom): void;
|
|
456
|
-
/**
|
|
457
|
-
* Add an activity to the room.
|
|
458
|
-
* @param activity The activity to add.
|
|
459
|
-
*/
|
|
460
|
-
addActivity(activity: ActivityModel): void;
|
|
461
|
-
/**
|
|
462
|
-
* Remove an activity from the room.
|
|
463
|
-
* @param activity The activity to remove.
|
|
464
|
-
*/
|
|
465
|
-
removeActivity(activity: ActivityModel | string): void;
|
|
466
|
-
/**
|
|
467
|
-
* Clear all expired activities.
|
|
468
|
-
*/
|
|
469
|
-
clearExpiredActivities(): void;
|
|
470
|
-
private defaultDisabled;
|
|
471
|
-
/**
|
|
472
|
-
* Whether is disabled. If it is a string, it is a Pixi'VN flag name.
|
|
473
|
-
*/
|
|
474
|
-
get disabled(): boolean;
|
|
475
|
-
set disabled(value: boolean | string);
|
|
476
|
-
private defaultHidden;
|
|
477
|
-
/**
|
|
478
|
-
* Whether is hidden. If it is a string, it is a Pixi'VN flag name.
|
|
479
|
-
*/
|
|
480
|
-
get hidden(): boolean;
|
|
481
|
-
set hidden(value: boolean | string);
|
|
482
|
-
/**
|
|
483
|
-
* The icon element. Can be a string or an Element or a Pixi'VN CanvasItem
|
|
484
|
-
*/
|
|
485
|
-
private _icon?;
|
|
486
|
-
get icon(): GraphicItemType | undefined;
|
|
487
|
-
/**
|
|
488
|
-
* Get the character commitments of the room.
|
|
489
|
-
* @returns The character commitments of the room.
|
|
490
|
-
*/
|
|
491
|
-
getRoutine<TCommitment extends CommitmentBaseModel = CommitmentBaseModel>(): TCommitment[];
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
interface LocationBaseModelProps {
|
|
495
|
-
/**
|
|
496
|
-
* The name
|
|
497
|
-
* @default ""
|
|
498
|
-
*/
|
|
499
|
-
name?: string;
|
|
500
|
-
/**
|
|
501
|
-
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
502
|
-
* @default false
|
|
503
|
-
*/
|
|
504
|
-
disabled?: boolean | string;
|
|
505
|
-
/**
|
|
506
|
-
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
507
|
-
* @default false
|
|
508
|
-
*/
|
|
509
|
-
hidden?: boolean | string;
|
|
510
|
-
/**
|
|
511
|
-
* The icon element. Can be a string or an Element or a Pixi'VN CanvasItem
|
|
512
|
-
* @default undefined
|
|
513
|
-
*/
|
|
514
|
-
icon?: GraphicItemType;
|
|
515
|
-
}
|
|
516
|
-
/**
|
|
517
|
-
* The base model of a location. I suggest you extend this class to create your own location model.
|
|
518
|
-
* @example
|
|
519
|
-
* ```typescript
|
|
520
|
-
* export const mcHome = new LocationBaseModel('mc_home', mainMap, {
|
|
521
|
-
* name: 'MC Home',
|
|
522
|
-
* icon: "https://icon.jpg",
|
|
523
|
-
* });
|
|
524
|
-
* ```
|
|
525
|
-
*/
|
|
526
|
-
declare class LocationBaseModel<TMap extends MapBaseModel = MapBaseModel> extends StoredClassModel {
|
|
527
|
-
/**
|
|
528
|
-
* @param id The id of the location, it must be unique.
|
|
529
|
-
* @param map The map where the location is.
|
|
530
|
-
* @param props The properties of the location.
|
|
531
|
-
*/
|
|
532
|
-
constructor(id: string, map: TMap, props?: LocationBaseModelProps);
|
|
533
|
-
private defaultName;
|
|
534
|
-
/**
|
|
535
|
-
* The name of the location.
|
|
536
|
-
* If you set undefined, it will return the initial value of name.
|
|
537
|
-
*/
|
|
538
|
-
get name(): string;
|
|
539
|
-
set name(value: string | undefined);
|
|
540
|
-
private defaultDisabled;
|
|
541
|
-
/**
|
|
542
|
-
* Whether is disabled. If it is a string, it is a Pixi'VN flag name.
|
|
543
|
-
*/
|
|
544
|
-
get disabled(): boolean;
|
|
545
|
-
set disabled(value: boolean | string);
|
|
546
|
-
private defaultHidden;
|
|
547
|
-
/**
|
|
548
|
-
* Whether is hidden. If it is a string, it is a Pixi'VN flag name.
|
|
549
|
-
*/
|
|
550
|
-
get hidden(): boolean;
|
|
551
|
-
set hidden(value: boolean | string);
|
|
552
|
-
private _icon?;
|
|
553
|
-
/**
|
|
554
|
-
* The icon element. Can be a string or an Element or a Pixi'VN CanvasItem
|
|
555
|
-
*/
|
|
556
|
-
get icon(): GraphicItemType | undefined;
|
|
557
|
-
private _map;
|
|
558
|
-
/**
|
|
559
|
-
* The map where the location is.
|
|
560
|
-
*/
|
|
561
|
-
get map(): TMap;
|
|
562
|
-
/**
|
|
563
|
-
* Get the entrance room of the location.
|
|
564
|
-
* You can cast the room to a specific type that extends RoomBaseModel.
|
|
565
|
-
* @returns The entrance room or the first room if there is no entrance.
|
|
566
|
-
* @example
|
|
567
|
-
* ```typescript
|
|
568
|
-
* const entranceHome = new RoomBaseModel("entrance-home", home, { isEntrance: true })
|
|
569
|
-
* saveRoom(entranceHome)
|
|
570
|
-
* const home = new LocationBaseModel("home", map, { name: "Home" })
|
|
571
|
-
*
|
|
572
|
-
* const entrance = home.getEntrance() // entrance === entranceHome
|
|
573
|
-
* ```
|
|
574
|
-
*/
|
|
575
|
-
getEntrance<TRoom extends RoomBaseModel = RoomBaseModel>(): TRoom | undefined;
|
|
576
|
-
/**
|
|
577
|
-
* Get all rooms in the location.
|
|
578
|
-
* You can cast the rooms to a specific type that extends RoomBaseModel.
|
|
579
|
-
* @returns The rooms in the location.
|
|
580
|
-
*/
|
|
581
|
-
getRooms<TRoom extends RoomBaseModel = RoomBaseModel>(): TRoom[];
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
interface CommitmentBaseModelProps {
|
|
585
|
-
/**
|
|
586
|
-
* The name
|
|
587
|
-
* @default ""
|
|
588
|
-
*/
|
|
589
|
-
name?: string;
|
|
590
|
-
/**
|
|
591
|
-
* The hour when the commitment starts. If the commitment is not started yet, it will be hidden.
|
|
592
|
-
* If you set 3, the commitment will be hidden into hours 1 and 2, and will be shown from hour 3.
|
|
593
|
-
* @default TimeManager.minDayHours
|
|
594
|
-
*/
|
|
595
|
-
fromHour?: number;
|
|
596
|
-
/**
|
|
597
|
-
* The hour when the commitment ends. If the commitment is ended yet, it will be hidden.
|
|
598
|
-
* If you set 3, the commitment will be shown into hours 1 and 2 and will be hidden from hour 3.
|
|
599
|
-
* @default TimeManager.maxDayHours + 1
|
|
600
|
-
*/
|
|
601
|
-
toHour?: number;
|
|
602
|
-
/**
|
|
603
|
-
* The day when the commitment starts. If the commitment is not started yet, it will be hidden.
|
|
604
|
-
* If you set 3, the commitment will be hidden into days 1 and 2, and will be shown from day 3.
|
|
605
|
-
* @default undefined
|
|
606
|
-
*/
|
|
607
|
-
fromDay?: number;
|
|
608
|
-
/**
|
|
609
|
-
* The day when the commitment ends. If the commitment is ended yet, it will be deleted or hidden.
|
|
610
|
-
* If you set 3, the commitment will be shown into days 1 and 2 and will be deleted or hidden from day 3.
|
|
611
|
-
* @default undefined
|
|
612
|
-
*/
|
|
613
|
-
toDay?: number;
|
|
614
|
-
/**
|
|
615
|
-
* The image. It can be a string, an Element or a Pixi'VN Canvas Item.
|
|
616
|
-
* Or an object to manage multiple image types. For example to have a image based on time.
|
|
617
|
-
* @example
|
|
618
|
-
* ```ts
|
|
619
|
-
* {
|
|
620
|
-
* "morning": "morning-background.jpg",
|
|
621
|
-
* "afternoon": "afternoon-background.jpg",
|
|
622
|
-
* "evening": "evening-background.jpg",
|
|
623
|
-
* "night": "night-background.jpg"
|
|
624
|
-
* }
|
|
625
|
-
* ```
|
|
626
|
-
* @default undefined
|
|
627
|
-
*/
|
|
628
|
-
image?: GraphicItemType | Record<any, GraphicItemType> | object;
|
|
629
|
-
/**
|
|
630
|
-
* 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.
|
|
631
|
-
* @default ExecutionTypeEnum.INTERACTION
|
|
632
|
-
*/
|
|
633
|
-
executionType?: ExecutionTypeEnum;
|
|
634
|
-
/**
|
|
635
|
-
* Is a function that is called when the player interacts with the character.
|
|
636
|
-
* @param commitment
|
|
637
|
-
* @returns
|
|
638
|
-
* @default undefined
|
|
639
|
-
*/
|
|
640
|
-
onRun?: (commitment: CommitmentBaseModel) => void;
|
|
641
|
-
/**
|
|
642
|
-
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
643
|
-
* 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.
|
|
644
|
-
* @default false
|
|
645
|
-
*/
|
|
646
|
-
disabled?: boolean | string;
|
|
647
|
-
/**
|
|
648
|
-
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
649
|
-
* @default false
|
|
650
|
-
*/
|
|
651
|
-
hidden?: boolean | string;
|
|
652
|
-
}
|
|
653
|
-
/**
|
|
654
|
-
* The base model of a commitment. I suggest you extend this class to create your own commitment model.
|
|
655
|
-
* You must use the saveRoom function to save the commitment in the registered commitments.
|
|
656
|
-
* @example
|
|
657
|
-
* ```ts
|
|
658
|
-
* export const mcRoom = new CommitmentBaseModel("test", character, room, {
|
|
659
|
-
* name: "Test",
|
|
660
|
-
* image: "https://image.jpg",
|
|
661
|
-
* executionType: ExecutionTypeEnum.INTERACTION,
|
|
662
|
-
* onRun: (commitment) => {
|
|
663
|
-
* // Do something
|
|
664
|
-
* }
|
|
665
|
-
})
|
|
666
|
-
* saveCommitment(mcRoom)
|
|
667
|
-
* ```
|
|
668
|
-
*/
|
|
669
|
-
declare class CommitmentBaseModel<TCharacter extends CharacterBaseModel = CharacterBaseModel, TRoom extends RoomBaseModel = RoomBaseModel> extends StoredClassModel {
|
|
670
|
-
/**
|
|
671
|
-
* @param id The id of the commitment, it must be unique.
|
|
672
|
-
* @param character The character or characters that are in the commitment and so in the room.
|
|
673
|
-
* @param room The room where the commitment is.
|
|
674
|
-
* @param props The properties of the commitment.
|
|
675
|
-
*/
|
|
676
|
-
constructor(id: string, character: TCharacter | TCharacter[] | undefined, room: TRoom, props: CommitmentBaseModelProps);
|
|
677
|
-
private _characters;
|
|
678
|
-
/**
|
|
679
|
-
* The character or characters that are in the commitment and so in the room.
|
|
680
|
-
*/
|
|
681
|
-
get characters(): TCharacter[];
|
|
682
|
-
private _room;
|
|
683
|
-
/**
|
|
684
|
-
* The room where the commitment is.
|
|
685
|
-
*/
|
|
686
|
-
get room(): TRoom;
|
|
687
|
-
private _name;
|
|
688
|
-
/**
|
|
689
|
-
* The name
|
|
690
|
-
*/
|
|
691
|
-
get name(): GraphicItemType;
|
|
692
|
-
private defaultFromHour?;
|
|
693
|
-
/**
|
|
694
|
-
* The hour when the commitment starts. If the commitment is not started yet, it will be hidden.
|
|
695
|
-
* If you set undefined, it will return the initial value of fromHour.
|
|
696
|
-
*/
|
|
697
|
-
get fromHour(): number;
|
|
698
|
-
set fromHour(value: number | undefined);
|
|
699
|
-
private defaultToHour?;
|
|
700
|
-
/**
|
|
701
|
-
* The hour when the commitment ends. If the commitment is ended yet, it will be hidden.
|
|
702
|
-
* If you set undefined, it will return the initial value of toHour.
|
|
703
|
-
*/
|
|
704
|
-
get toHour(): number;
|
|
705
|
-
set toHour(value: number | undefined);
|
|
706
|
-
private defaultFromDay?;
|
|
707
|
-
/**
|
|
708
|
-
* The day when the commitment starts. If the commitment is not started yet, it will be hidden.
|
|
709
|
-
* If you set undefined, it will return the initial value of fromDay.
|
|
710
|
-
*/
|
|
711
|
-
get fromDay(): number | undefined;
|
|
712
|
-
set fromDay(value: number | undefined);
|
|
713
|
-
private defaultToDay?;
|
|
714
|
-
/**
|
|
715
|
-
* The day when the commitment ends. If the commitment is ended yet, it will be deleted or hidden.
|
|
716
|
-
* If you set undefined, it will return the initial value of toDay.
|
|
717
|
-
*/
|
|
718
|
-
get toDay(): number | undefined;
|
|
719
|
-
set toDay(value: number | undefined);
|
|
720
|
-
private _image?;
|
|
721
|
-
/**
|
|
722
|
-
* The image. It can be a string, an Element or a Pixi'VN Canvas Item.
|
|
723
|
-
*/
|
|
724
|
-
get image(): GraphicItemType | Record<any, GraphicItemType> | object | undefined;
|
|
725
|
-
private _executionType;
|
|
726
|
-
/**
|
|
727
|
-
* 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.
|
|
728
|
-
*/
|
|
729
|
-
get executionType(): ExecutionTypeEnum;
|
|
730
|
-
private _onRun?;
|
|
731
|
-
/**
|
|
732
|
-
* Is a function that is called when the player interacts with the character.
|
|
733
|
-
*/
|
|
734
|
-
onRun(): void;
|
|
735
|
-
private defaultDisabled;
|
|
736
|
-
/**
|
|
737
|
-
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
738
|
-
*/
|
|
739
|
-
get disabled(): boolean;
|
|
740
|
-
set disabled(value: boolean | string);
|
|
741
|
-
private defaultHidden;
|
|
742
|
-
/**
|
|
743
|
-
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
744
|
-
*/
|
|
745
|
-
get hidden(): boolean;
|
|
746
|
-
set hidden(value: boolean | string);
|
|
747
|
-
/**
|
|
748
|
-
* Whether the commitment is expired.
|
|
749
|
-
* @returns Whether the commitment is expired.
|
|
750
|
-
*/
|
|
751
|
-
isExpired(): boolean;
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
interface GoalProps {
|
|
755
|
-
description: string;
|
|
756
|
-
need?: number;
|
|
757
|
-
have?: number;
|
|
758
|
-
}
|
|
759
|
-
interface IGoal {
|
|
760
|
-
description: string;
|
|
761
|
-
need: number;
|
|
762
|
-
have: number;
|
|
763
|
-
}
|
|
764
|
-
declare class Goal implements IGoal {
|
|
765
|
-
constructor(props: GoalProps);
|
|
766
|
-
private _description;
|
|
767
|
-
get description(): string;
|
|
768
|
-
need: number;
|
|
769
|
-
have: number;
|
|
770
|
-
get isComplete(): boolean;
|
|
771
|
-
setComplete(): void;
|
|
772
|
-
find(): void;
|
|
773
|
-
get export(): IGoal;
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
type QuestsRequiredType<TQuest extends QuestBaseModel = QuestBaseModel> = {
|
|
777
|
-
quest: TQuest;
|
|
778
|
-
stageNumber: number;
|
|
779
|
-
} | TQuest;
|
|
780
|
-
|
|
781
|
-
interface StageBaseModelProps {
|
|
782
|
-
goals?: Goal[];
|
|
783
|
-
name?: string;
|
|
784
|
-
description?: string;
|
|
785
|
-
adviceDescription?: string;
|
|
786
|
-
image?: string;
|
|
787
|
-
daysRequiredToStart: number;
|
|
788
|
-
flagsRequired: string[];
|
|
789
|
-
questsRequired: QuestsRequiredType[];
|
|
790
|
-
requestDescription?: string;
|
|
791
|
-
onStart: () => void;
|
|
792
|
-
onEnd: () => void;
|
|
793
|
-
}
|
|
794
|
-
declare class StageBaseModel extends StoredClassModel {
|
|
795
|
-
constructor(id: string, props: StageBaseModelProps);
|
|
796
|
-
private _completed;
|
|
797
|
-
get completed(): boolean;
|
|
798
|
-
private _active;
|
|
799
|
-
get active(): boolean;
|
|
800
|
-
private defaultGoals;
|
|
801
|
-
get goals(): Goal[];
|
|
802
|
-
set goals(value: Goal[]);
|
|
803
|
-
private _name;
|
|
804
|
-
get name(): string;
|
|
805
|
-
private _description;
|
|
806
|
-
get description(): string;
|
|
807
|
-
private _adviceDescription;
|
|
808
|
-
get adviceDescription(): string;
|
|
809
|
-
private _image;
|
|
810
|
-
get image(): string;
|
|
811
|
-
private _daysRequiredToStart;
|
|
812
|
-
get daysRequiredToStart(): number;
|
|
813
|
-
private _flagsRequired;
|
|
814
|
-
get flagsRequired(): string[];
|
|
815
|
-
private _questsRequired;
|
|
816
|
-
get questsRequired(): QuestsRequiredType[];
|
|
817
|
-
private _requestDescription;
|
|
818
|
-
get requestDescription(): string;
|
|
819
|
-
private _onStart;
|
|
820
|
-
get onStart(): () => void;
|
|
821
|
-
private _onEnd;
|
|
822
|
-
get onEnd(): () => void;
|
|
823
|
-
}
|
|
824
|
-
|
|
825
|
-
interface QuestBaseModelProps {
|
|
826
|
-
name?: string;
|
|
827
|
-
description?: string;
|
|
828
|
-
icon?: string;
|
|
829
|
-
image?: string;
|
|
830
|
-
isInDevelopment?: boolean;
|
|
831
|
-
}
|
|
832
|
-
declare class QuestBaseModel<TStage extends StageBaseModel = StageBaseModel> extends StoredClassModel {
|
|
833
|
-
constructor(id: string, stages: TStage[], props: QuestBaseModelProps);
|
|
834
|
-
private _stages;
|
|
835
|
-
get stages(): TStage[];
|
|
836
|
-
private _name;
|
|
837
|
-
get name(): string;
|
|
838
|
-
private _description;
|
|
839
|
-
get description(): string;
|
|
840
|
-
private _icon;
|
|
841
|
-
get icon(): string;
|
|
842
|
-
private _image;
|
|
843
|
-
get image(): string;
|
|
844
|
-
private _isInDevelopment;
|
|
845
|
-
get isInDevelopment(): boolean;
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
declare function saveActivity(activity: ActivityModel | ActivityModel[]): void;
|
|
849
|
-
declare function getActivityById(id: string): ActivityModel | undefined;
|
|
850
|
-
|
|
851
|
-
declare function saveCommitment<TCommitment extends CommitmentBaseModel = CommitmentBaseModel>(commitment: TCommitment | TCommitment[]): void;
|
|
852
|
-
declare function getCommitmentById<TCommitment extends CommitmentBaseModel = CommitmentBaseModel>(id: string): TCommitment | undefined;
|
|
853
|
-
declare function setFixedCommitments<TCommitment extends CommitmentBaseModel = CommitmentBaseModel>(commitments: TCommitment[] | TCommitment): void;
|
|
854
|
-
declare function addTemporaryCommitment<TCommitment extends CommitmentBaseModel = CommitmentBaseModel>(commitment: TCommitment[] | TCommitment): void;
|
|
855
|
-
declare function getFixedCommitments<TCommitment extends CommitmentBaseModel = CommitmentBaseModel>(): TCommitment[];
|
|
856
|
-
declare function getTemporaryCommitments<TCommitment extends CommitmentBaseModel = CommitmentBaseModel>(): TCommitment[];
|
|
857
|
-
|
|
858
|
-
/**
|
|
859
|
-
* Save a room in the registered rooms.
|
|
860
|
-
* @param room The room to save.
|
|
861
|
-
* @returns
|
|
862
|
-
*/
|
|
863
|
-
declare function saveRoom<TRoom extends RoomBaseModel = RoomBaseModel>(room: TRoom | TRoom[]): void;
|
|
864
|
-
/**
|
|
865
|
-
* Get a room by its id.
|
|
866
|
-
* @param id The id of the room.
|
|
867
|
-
* @returns The room or undefined if not found.
|
|
868
|
-
*/
|
|
869
|
-
declare function getRoomById<TRoom extends RoomBaseModel = RoomBaseModel>(id: string): TRoom | undefined;
|
|
870
|
-
/**
|
|
871
|
-
* Get all locations in the registered rooms.
|
|
872
|
-
* @returns All locations in the registered rooms.
|
|
873
|
-
*/
|
|
874
|
-
declare function getAllLocations<TLocation extends LocationBaseModel = LocationBaseModel>(): TLocation[];
|
|
875
|
-
/**
|
|
876
|
-
* Get all maps in the registered rooms.
|
|
877
|
-
* @returns All maps in the registered rooms.
|
|
878
|
-
*/
|
|
879
|
-
declare function getAllMaps<TMap extends MapBaseModel = MapBaseModel>(): TMap[];
|
|
880
|
-
|
|
881
|
-
declare function clearExpiredActivities(): void;
|
|
882
|
-
declare function currentActivities(): ActivityRoom[];
|
|
883
|
-
|
|
884
|
-
declare function setCurrentRoom<TRoom extends RoomBaseModel = RoomBaseModel>(room: TRoom | LocationBaseModel): void;
|
|
885
|
-
declare function getCurrentRoom<TRoom extends RoomBaseModel = RoomBaseModel>(): TRoom | undefined;
|
|
886
|
-
declare function getCurrenrLocation<TLocation extends LocationBaseModel = LocationBaseModel>(): TLocation | undefined;
|
|
887
|
-
declare function getCueerntMap<TMap extends MapBaseModel = MapBaseModel>(): TMap | undefined;
|
|
888
|
-
|
|
889
|
-
declare function clearExpiredRoutine(): void;
|
|
890
|
-
declare function getCurrentCommitments<TCommitment extends CommitmentBaseModel = CommitmentBaseModel>(): TCommitment[];
|
|
891
|
-
declare function getCommitmentByCharacter<TCommitment extends CommitmentBaseModel = CommitmentBaseModel, TCharacter extends CharacterBaseModel = CharacterBaseModel>(character: TCharacter): TCommitment | undefined;
|
|
892
|
-
|
|
893
|
-
type ITimeStlot = {
|
|
894
|
-
name: string;
|
|
895
|
-
startHour: number;
|
|
896
|
-
};
|
|
897
|
-
/**
|
|
898
|
-
* Time Settings, which can be set using `TimeManager.editSettings`
|
|
899
|
-
*/
|
|
900
|
-
type TimeSettings = {
|
|
901
|
-
/**
|
|
902
|
-
* Minimum hour of the day
|
|
903
|
-
* @default 0
|
|
904
|
-
*/
|
|
905
|
-
minDayHours?: number;
|
|
906
|
-
/**
|
|
907
|
-
* Maximum hour of the day
|
|
908
|
-
* @default 24
|
|
909
|
-
*/
|
|
910
|
-
maxDayHours?: number;
|
|
911
|
-
/**
|
|
912
|
-
* Default time spent
|
|
913
|
-
* @default 1
|
|
914
|
-
*/
|
|
915
|
-
defaultTimeSpent?: number;
|
|
916
|
-
/**
|
|
917
|
-
* Time slots
|
|
918
|
-
* @default []
|
|
919
|
-
* @example
|
|
920
|
-
* ```ts
|
|
921
|
-
* [
|
|
922
|
-
* { name: 'Morning', startHour: 5 },
|
|
923
|
-
* { name: 'Afternoon', startHour: 12 },
|
|
924
|
-
* { name: 'Evening', startHour: 18 },
|
|
925
|
-
* { name: 'Night', startHour: 22 }
|
|
926
|
-
* ]
|
|
927
|
-
*/
|
|
928
|
-
timeSlots?: ITimeStlot[];
|
|
929
|
-
/**
|
|
930
|
-
* Week length
|
|
931
|
-
* @default 7
|
|
932
|
-
*/
|
|
933
|
-
weekLength?: number;
|
|
934
|
-
/**
|
|
935
|
-
* Weekend start day. For example, if the real life weekend starts on Saturday, then the value should be 6
|
|
936
|
-
* @default weekLength - 1
|
|
937
|
-
*/
|
|
938
|
-
weekendStartDay?: number;
|
|
939
|
-
/**
|
|
940
|
-
* Week days names
|
|
941
|
-
* @default []
|
|
942
|
-
* @example
|
|
943
|
-
* ```ts
|
|
944
|
-
* ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
|
|
945
|
-
* ```
|
|
946
|
-
*/
|
|
947
|
-
weekDaysNames?: string[];
|
|
948
|
-
};
|
|
949
|
-
|
|
950
|
-
declare class TimeManager {
|
|
951
|
-
private constructor();
|
|
952
|
-
private static editSettings;
|
|
953
|
-
/**
|
|
954
|
-
* Get time settings
|
|
955
|
-
* @default {}
|
|
956
|
-
*/
|
|
957
|
-
static get settings(): TimeSettings;
|
|
958
|
-
/**
|
|
959
|
-
* Set time settings, Is very important to set the settings before using the nqtr library, bacause more of the features are based on the time settings.
|
|
960
|
-
*/
|
|
961
|
-
static set settings(value: TimeSettings);
|
|
962
|
-
static get minDayHours(): number;
|
|
963
|
-
static get maxDayHours(): number;
|
|
964
|
-
static get defaultTimeSpent(): number;
|
|
965
|
-
static get timeSlots(): ITimeStlot[];
|
|
966
|
-
static get weekLength(): number;
|
|
967
|
-
static get weekendStartDay(): number;
|
|
968
|
-
static get weekDaysNames(): string[];
|
|
969
|
-
/**
|
|
970
|
-
* Get the current hour
|
|
971
|
-
*/
|
|
972
|
-
static get currentHour(): number;
|
|
973
|
-
static set currentHour(value: number | undefined);
|
|
974
|
-
/**
|
|
975
|
-
* Get the current day
|
|
976
|
-
*/
|
|
977
|
-
static get currentDay(): number;
|
|
978
|
-
static set currentDay(value: number | undefined);
|
|
979
|
-
/**
|
|
980
|
-
* If the current day is greater than or equal to the weekend start day, then it will return true.
|
|
981
|
-
*/
|
|
982
|
-
static get isWeekend(): boolean;
|
|
983
|
-
/**
|
|
984
|
-
* Get the current week day number (1-TimeManager.weekLength).
|
|
985
|
-
* For example, if the week length is 7 and the current day is 10, then the result will be 4.
|
|
986
|
-
*/
|
|
987
|
-
static get currentWeekDayNumber(): number;
|
|
988
|
-
/**
|
|
989
|
-
* Get the current week day name. If the week days names are not defined, then it will return undefined.
|
|
990
|
-
* For example, if the week days names are ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'] and the current day is 10, then the result will be 'Thursday'.
|
|
991
|
-
* @default ""
|
|
992
|
-
*/
|
|
993
|
-
static get currentDayName(): string;
|
|
994
|
-
/**
|
|
995
|
-
* Get the current TimeManager.timeSlots index.
|
|
996
|
-
* You can use this property to create "Image that changes based on the time period":
|
|
997
|
-
* @example
|
|
998
|
-
* ```ts
|
|
999
|
-
* import { TimeManager } from '@drincs/nqtr';
|
|
1000
|
-
*
|
|
1001
|
-
* function changeBackground() {
|
|
1002
|
-
* return (
|
|
1003
|
-
* <img src={`background-${TimeManager.currentTimeSlot}.png`} />
|
|
1004
|
-
* )
|
|
1005
|
-
* }
|
|
1006
|
-
*/
|
|
1007
|
-
static get currentTimeSlot(): number;
|
|
1008
|
-
/**
|
|
1009
|
-
* This function will increase the current hour by the given time spent.
|
|
1010
|
-
* If the new hour is greater than or equal to the max day hours, then it will increase the day and set the new hour.
|
|
1011
|
-
* @param timeSpent is the time spent in hours (default: TimeManager.defaultTimeSpent)
|
|
1012
|
-
* @returns TimeManager.currentHour
|
|
1013
|
-
*/
|
|
1014
|
-
static increaseHour(timeSpent?: number): number;
|
|
1015
|
-
/**
|
|
1016
|
-
* This function will increase the current day by the given days.
|
|
1017
|
-
* @param newDayHour is the hour of the new day (default: TimeManager.minDayHours)
|
|
1018
|
-
* @param days is the number of days to increase (default: 1)
|
|
1019
|
-
* @returns TimeManager.currentDay
|
|
1020
|
-
*/
|
|
1021
|
-
static increaseDay(newDayHour?: number, days?: number): number;
|
|
1022
|
-
/**
|
|
1023
|
-
* This function will check if the current hour is between the given hours.
|
|
1024
|
-
* @param fromHour the starting hour. If the TimeManager.currentHour is equal to this hour, the function will return true.
|
|
1025
|
-
* @param toHour the ending hour.
|
|
1026
|
-
* @returns true if the current hour is between the given hours, otherwise false.
|
|
1027
|
-
*/
|
|
1028
|
-
static nowIsBetween(fromHour: number, toHour: number): boolean;
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
export { ActivityModel, type ActivityProps, CommitmentBaseModel, type CommitmentBaseModelProps, ExecutionTypeEnum, Goal, type GoalProps, type ITimeStlot, LocationBaseModel, type LocationBaseModelProps, MapBaseModel, type MapBaseModelProps, QuestBaseModel, type QuestBaseModelProps, type QuestsRequiredType, RoomBaseModel, type RoomBaseModelProps, StageBaseModel, type StageBaseModelProps, TimeManager, type TimeSettings, addTemporaryCommitment, clearExpiredActivities, clearExpiredRoutine, currentActivities, getActivityById, getAllLocations, getAllMaps, getCommitmentByCharacter, getCommitmentById, getCueerntMap, getCurrenrLocation, getCurrentCommitments, getCurrentRoom, getFixedCommitments, getRoomById, getTemporaryCommitments, saveActivity, saveCommitment, saveRoom, setCurrentRoom, setFixedCommitments };
|
|
1
|
+
export { default as ActivityModel, ActivityProps } from './classes/Activity.mjs';
|
|
2
|
+
export { C as CommitmentBaseModel, a as CommitmentBaseModelProps, L as LocationBaseModel, b as LocationBaseModelProps, M as MapBaseModel, c as MapBaseModelProps, R as RoomBaseModel, d as RoomBaseModelProps } from './index-BvCfRbJB.mjs';
|
|
3
|
+
export { default as Goal, GoalProps } from './classes/quest/Goal.mjs';
|
|
4
|
+
export { Q as QuestBaseModel, a as QuestBaseModelProps, c as QuestsRequiredType, S as StageBaseModel, b as StageBaseModelProps } from './index-gJ26gdgL.mjs';
|
|
5
|
+
export { getActivityById, saveActivity } from './decorators/ActivityDecorator.mjs';
|
|
6
|
+
export { addTemporaryCommitment, getCommitmentById, getFixedCommitments, getTemporaryCommitments, saveCommitment, setFixedCommitments } from './decorators/CommitmentDecorator.mjs';
|
|
7
|
+
export { getAllLocations, getAllMaps, getRoomById, saveRoom } from './decorators/RoomDecorator.mjs';
|
|
8
|
+
export { ExecutionTypeEnum } from './enums/ExecutionTypeEnum.mjs';
|
|
9
|
+
export { clearExpiredActivities, currentActivities } from './functions/ActivityFunctions.mjs';
|
|
10
|
+
export { getCueerntMap, getCurrenrLocation, getCurrentRoom, setCurrentRoom } from './functions/NavigationFunctions.mjs';
|
|
11
|
+
export { clearExpiredRoutine, getCommitmentByCharacter, getCurrentCommitments } from './functions/RoutineFunctions.mjs';
|
|
12
|
+
export { default as TimeManager } from './managers/TimeManager.mjs';
|
|
13
|
+
export { ITimeStlot, TimeSettings } from './types/TimeSettings.mjs';
|
|
14
|
+
import './override/OnRunActivityProps.mjs';
|
|
15
|
+
import './types/GraphicItem.mjs';
|
|
16
|
+
import '@drincs/pixi-vn';
|