@drincs/nqtr 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/index.d.mts +547 -0
- package/dist/index.d.ts +547 -0
- package/dist/index.js +1108 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1057 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +48 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,547 @@
|
|
|
1
|
+
import { CanvasBase, StoredClassModel, CharacterBaseModel } from '@drincs/pixi-vn';
|
|
2
|
+
|
|
3
|
+
type GraphicItemType<TCanvasItem extends CanvasBase<any> = CanvasBase<any>> = string | HTMLElement | TCanvasItem;
|
|
4
|
+
|
|
5
|
+
interface ActivityProps {
|
|
6
|
+
/**
|
|
7
|
+
* The name
|
|
8
|
+
*/
|
|
9
|
+
name?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The hour when the activity starts. If the activity is not started yet, it will be hidden.
|
|
12
|
+
* If you set 3, the activity will be hidden into hours 1 and 2, and will be shown from hour 3.
|
|
13
|
+
*/
|
|
14
|
+
fromHour?: number;
|
|
15
|
+
/**
|
|
16
|
+
* The hour when the activity ends. If the activity is ended yet, it will be hidden.
|
|
17
|
+
* If you set 3, the activity will be shown into hours 1 and 2 and will be hidden from hour 3.
|
|
18
|
+
*/
|
|
19
|
+
toHour?: number;
|
|
20
|
+
/**
|
|
21
|
+
* The day when the activity starts. If the activity is not started yet, it will be hidden.
|
|
22
|
+
* If you set 3, the activity will be hidden into days 1 and 2, and will be shown from day 3.
|
|
23
|
+
*/
|
|
24
|
+
fromDay?: number;
|
|
25
|
+
/**
|
|
26
|
+
* The day when the activity ends. If the activity is ended yet, it will be deleted or hidden.
|
|
27
|
+
* If you set 3, the activity will be shown into days 1 and 2 and will be deleted or hidden from day 3.
|
|
28
|
+
*/
|
|
29
|
+
toDay?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
32
|
+
*/
|
|
33
|
+
disabled?: boolean | string;
|
|
34
|
+
/**
|
|
35
|
+
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
36
|
+
*/
|
|
37
|
+
hidden?: boolean | string;
|
|
38
|
+
/**
|
|
39
|
+
* The icon element. Can be a string or an HTMLElement or a Pixi'VN CanvasItem
|
|
40
|
+
*/
|
|
41
|
+
iconElement?: GraphicItemType;
|
|
42
|
+
}
|
|
43
|
+
declare abstract class ActivityStoredAbstract {
|
|
44
|
+
constructor(onRun: (activity: ActivityModel) => void, props: ActivityProps);
|
|
45
|
+
abstract setStorageProperty<T>(propertyName: string, value: T | undefined): void;
|
|
46
|
+
abstract getStorageProperty<T>(propertyName: string): T | undefined;
|
|
47
|
+
abstract get id(): string;
|
|
48
|
+
private defaultName?;
|
|
49
|
+
get name(): string;
|
|
50
|
+
set name(value: string | undefined);
|
|
51
|
+
private defaultFromHour?;
|
|
52
|
+
get fromHour(): number;
|
|
53
|
+
set fromHour(value: number | undefined);
|
|
54
|
+
private defaultToHour?;
|
|
55
|
+
get toHour(): number;
|
|
56
|
+
set toHour(value: number | undefined);
|
|
57
|
+
private defaultFromDay?;
|
|
58
|
+
get fromDay(): number | undefined;
|
|
59
|
+
set fromDay(value: number | undefined);
|
|
60
|
+
private defaultToDay?;
|
|
61
|
+
get toDay(): number | undefined;
|
|
62
|
+
set toDay(value: number | undefined);
|
|
63
|
+
private defaultDisabled;
|
|
64
|
+
get disabled(): boolean;
|
|
65
|
+
set disabled(value: boolean | string);
|
|
66
|
+
private defaultHidden;
|
|
67
|
+
get hidden(): boolean;
|
|
68
|
+
set hidden(value: boolean | string);
|
|
69
|
+
private _iconElement?;
|
|
70
|
+
get iconElement(): GraphicItemType | undefined;
|
|
71
|
+
private _onRun;
|
|
72
|
+
get onRun(): (activity: ActivityModel) => void;
|
|
73
|
+
isExpired(): boolean;
|
|
74
|
+
export(): ActivityProps;
|
|
75
|
+
}
|
|
76
|
+
declare class ActivityModel {
|
|
77
|
+
constructor(id: string, onRun: (activity: ActivityModel) => void, props: ActivityProps);
|
|
78
|
+
private _id;
|
|
79
|
+
get id(): string;
|
|
80
|
+
private _name?;
|
|
81
|
+
get name(): string | undefined;
|
|
82
|
+
private _fromHour?;
|
|
83
|
+
get fromHour(): number | undefined;
|
|
84
|
+
private _toHour?;
|
|
85
|
+
get toHour(): number | undefined;
|
|
86
|
+
private _fromDay?;
|
|
87
|
+
get fromDay(): number | undefined;
|
|
88
|
+
private _toDay?;
|
|
89
|
+
get toDay(): number | undefined;
|
|
90
|
+
private _disabled?;
|
|
91
|
+
get disabled(): boolean | undefined;
|
|
92
|
+
private _hidden;
|
|
93
|
+
get hidden(): boolean;
|
|
94
|
+
private _iconElement?;
|
|
95
|
+
get iconElement(): GraphicItemType | undefined;
|
|
96
|
+
private _onRun;
|
|
97
|
+
get onRun(): (activity: ActivityModel) => void;
|
|
98
|
+
isDeadline(): boolean;
|
|
99
|
+
export(): ActivityProps;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
interface MapBaseModelProps<TMap extends MapBaseModel = MapBaseModel> {
|
|
103
|
+
/**
|
|
104
|
+
* The name
|
|
105
|
+
*/
|
|
106
|
+
name?: string;
|
|
107
|
+
/**
|
|
108
|
+
* The image. It can be a string, an HTMLElement or a Pixi'VN Canvas Item.
|
|
109
|
+
* Or an object to manage multiple image types. For example to have a image based on time.
|
|
110
|
+
* @example
|
|
111
|
+
* ```ts
|
|
112
|
+
* {
|
|
113
|
+
* "morning": "morning-background.jpg",
|
|
114
|
+
* "afternoon": "afternoon-background.jpg",
|
|
115
|
+
* "evening": "evening-background.jpg",
|
|
116
|
+
* "night": "night-background.jpg"
|
|
117
|
+
* }
|
|
118
|
+
* ```
|
|
119
|
+
*/
|
|
120
|
+
image?: GraphicItemType | {
|
|
121
|
+
[key: string]: GraphicItemType;
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* The neighboring maps that are available in this map.
|
|
125
|
+
* @example
|
|
126
|
+
* ```ts
|
|
127
|
+
* {
|
|
128
|
+
* "north": atlantaMap,
|
|
129
|
+
* "south": miamiMap,
|
|
130
|
+
* "east": savannahMap,
|
|
131
|
+
* "west": birminghamMap
|
|
132
|
+
* }
|
|
133
|
+
* ```
|
|
134
|
+
*/
|
|
135
|
+
neighboringMaps?: {
|
|
136
|
+
[key: string]: TMap;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
140
|
+
*/
|
|
141
|
+
disabled?: boolean | string;
|
|
142
|
+
/**
|
|
143
|
+
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
144
|
+
*/
|
|
145
|
+
hidden?: boolean | string;
|
|
146
|
+
}
|
|
147
|
+
declare class MapBaseModel extends StoredClassModel {
|
|
148
|
+
constructor(id: string, props: MapBaseModelProps);
|
|
149
|
+
private defaultName;
|
|
150
|
+
get name(): string;
|
|
151
|
+
set name(value: string);
|
|
152
|
+
private defaultImage?;
|
|
153
|
+
get image(): GraphicItemType | {
|
|
154
|
+
[key: string]: GraphicItemType;
|
|
155
|
+
} | undefined;
|
|
156
|
+
set image(value: GraphicItemType | {
|
|
157
|
+
[key: string]: GraphicItemType;
|
|
158
|
+
} | undefined);
|
|
159
|
+
private defaultDisabled;
|
|
160
|
+
get disabled(): boolean;
|
|
161
|
+
set disabled(value: boolean | string);
|
|
162
|
+
private defaultHidden;
|
|
163
|
+
get hidden(): boolean;
|
|
164
|
+
set hidden(value: boolean | string);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
declare enum ExecutionTypeEnum {
|
|
168
|
+
AUTOMATIC = "automatic",
|
|
169
|
+
INTERACTION = "interaction"
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
interface CommitmentBaseModelProps {
|
|
173
|
+
/**
|
|
174
|
+
* The name
|
|
175
|
+
*/
|
|
176
|
+
name?: string;
|
|
177
|
+
/**
|
|
178
|
+
* The hour when the commitment starts. If the commitment is not started yet, it will be hidden.
|
|
179
|
+
* If you set 3, the commitment will be hidden into hours 1 and 2, and will be shown from hour 3.
|
|
180
|
+
*/
|
|
181
|
+
fromHour?: number;
|
|
182
|
+
/**
|
|
183
|
+
* The hour when the commitment ends. If the commitment is ended yet, it will be hidden.
|
|
184
|
+
* If you set 3, the commitment will be shown into hours 1 and 2 and will be hidden from hour 3.
|
|
185
|
+
*/
|
|
186
|
+
toHour?: number;
|
|
187
|
+
/**
|
|
188
|
+
* The day when the commitment starts. If the commitment is not started yet, it will be hidden.
|
|
189
|
+
* If you set 3, the commitment will be hidden into days 1 and 2, and will be shown from day 3.
|
|
190
|
+
*/
|
|
191
|
+
fromDay?: number;
|
|
192
|
+
/**
|
|
193
|
+
* The day when the commitment ends. If the commitment is ended yet, it will be deleted or hidden.
|
|
194
|
+
* If you set 3, the commitment will be shown into days 1 and 2 and will be deleted or hidden from day 3.
|
|
195
|
+
*/
|
|
196
|
+
toDay?: number;
|
|
197
|
+
/**
|
|
198
|
+
* The image. It can be a string, an HTMLElement or a Pixi'VN Canvas Item.
|
|
199
|
+
* Or an object to manage multiple image types. For example to have a image based on time.
|
|
200
|
+
* @example
|
|
201
|
+
* ```ts
|
|
202
|
+
* {
|
|
203
|
+
* "morning": "morning-background.jpg",
|
|
204
|
+
* "afternoon": "afternoon-background.jpg",
|
|
205
|
+
* "evening": "evening-background.jpg",
|
|
206
|
+
* "night": "night-background.jpg"
|
|
207
|
+
* }
|
|
208
|
+
* ```
|
|
209
|
+
*/
|
|
210
|
+
image?: GraphicItemType | {
|
|
211
|
+
[key: string]: GraphicItemType;
|
|
212
|
+
};
|
|
213
|
+
/**
|
|
214
|
+
* 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.
|
|
215
|
+
*/
|
|
216
|
+
executionType?: ExecutionTypeEnum;
|
|
217
|
+
/**
|
|
218
|
+
* Is a function that is called when the player interacts with the character.
|
|
219
|
+
* @param commitment
|
|
220
|
+
* @returns
|
|
221
|
+
*/
|
|
222
|
+
onRun?: (commitment: CommitmentBaseModel) => void;
|
|
223
|
+
/**
|
|
224
|
+
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
225
|
+
* 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.
|
|
226
|
+
*/
|
|
227
|
+
disabled?: boolean | string;
|
|
228
|
+
/**
|
|
229
|
+
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
230
|
+
*/
|
|
231
|
+
hidden?: boolean | string;
|
|
232
|
+
}
|
|
233
|
+
declare class CommitmentBaseModel<TCharacter extends CharacterBaseModel = CharacterBaseModel, TRoom extends RoomBaseModel = RoomBaseModel> extends StoredClassModel {
|
|
234
|
+
constructor(id: string, character: TCharacter | TCharacter[] | undefined, room: TRoom, props: CommitmentBaseModelProps);
|
|
235
|
+
private _characters;
|
|
236
|
+
get characters(): TCharacter[];
|
|
237
|
+
private _room;
|
|
238
|
+
get room(): TRoom;
|
|
239
|
+
private _name;
|
|
240
|
+
get name(): GraphicItemType;
|
|
241
|
+
private defaultFromHour?;
|
|
242
|
+
get fromHour(): number;
|
|
243
|
+
set fromHour(value: number | undefined);
|
|
244
|
+
private defaultToHour?;
|
|
245
|
+
get toHour(): number;
|
|
246
|
+
set toHour(value: number | undefined);
|
|
247
|
+
private defaultFromDay?;
|
|
248
|
+
get fromDay(): number | undefined;
|
|
249
|
+
set fromDay(value: number | undefined);
|
|
250
|
+
private defaultToDay?;
|
|
251
|
+
get toDay(): number | undefined;
|
|
252
|
+
set toDay(value: number | undefined);
|
|
253
|
+
private _image?;
|
|
254
|
+
get image(): GraphicItemType | {
|
|
255
|
+
[key: string]: GraphicItemType;
|
|
256
|
+
} | undefined;
|
|
257
|
+
private _executionType;
|
|
258
|
+
get executionType(): ExecutionTypeEnum;
|
|
259
|
+
private _onRun?;
|
|
260
|
+
onRun(): void;
|
|
261
|
+
private defaultDisabled;
|
|
262
|
+
get disabled(): boolean;
|
|
263
|
+
set disabled(value: boolean | string);
|
|
264
|
+
private defaultHidden;
|
|
265
|
+
get hidden(): boolean;
|
|
266
|
+
set hidden(value: boolean | string);
|
|
267
|
+
isExpired(): boolean;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
declare class ActivityRoom<TRoom extends RoomBaseModel = RoomBaseModel> extends ActivityStoredAbstract {
|
|
271
|
+
constructor(id: string, room: TRoom, onRun: (activity: ActivityModel) => void, props: ActivityProps);
|
|
272
|
+
setStorageProperty<T>(_: string, __: T | undefined): void;
|
|
273
|
+
getStorageProperty<T>(propertyName: string): T | undefined;
|
|
274
|
+
private _id;
|
|
275
|
+
get id(): string;
|
|
276
|
+
private _room;
|
|
277
|
+
get room(): TRoom;
|
|
278
|
+
export(): object;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
interface RoomBaseModelProps {
|
|
282
|
+
/**
|
|
283
|
+
* The name
|
|
284
|
+
*/
|
|
285
|
+
name?: string;
|
|
286
|
+
/**
|
|
287
|
+
* The image. It can be a string, an HTMLElement or a Pixi'VN Canvas Item.
|
|
288
|
+
* Or an object to manage multiple image types. For example to have a image based on time.
|
|
289
|
+
* @example
|
|
290
|
+
* ```ts
|
|
291
|
+
* {
|
|
292
|
+
* "morning": "morning-background.jpg",
|
|
293
|
+
* "afternoon": "afternoon-background.jpg",
|
|
294
|
+
* "evening": "evening-background.jpg",
|
|
295
|
+
* "night": "night-background.jpg"
|
|
296
|
+
* }
|
|
297
|
+
* ```
|
|
298
|
+
*/
|
|
299
|
+
image?: GraphicItemType | {
|
|
300
|
+
[key: string]: GraphicItemType;
|
|
301
|
+
};
|
|
302
|
+
/**
|
|
303
|
+
* The activities that are available in this room.
|
|
304
|
+
*/
|
|
305
|
+
defaultActivities?: ActivityModel[];
|
|
306
|
+
/**
|
|
307
|
+
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
308
|
+
*/
|
|
309
|
+
disabled?: boolean | string;
|
|
310
|
+
/**
|
|
311
|
+
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
312
|
+
*/
|
|
313
|
+
hidden?: boolean | string;
|
|
314
|
+
/**
|
|
315
|
+
* The icon element. Can be a string or an HTMLElement or a Pixi'VN CanvasItem
|
|
316
|
+
*/
|
|
317
|
+
iconElement?: GraphicItemType;
|
|
318
|
+
}
|
|
319
|
+
declare class RoomBaseModel<TLocation extends LocationBaseModel = LocationBaseModel> extends StoredClassModel {
|
|
320
|
+
constructor(id: string, location: TLocation, props: RoomBaseModelProps);
|
|
321
|
+
private _location;
|
|
322
|
+
get location(): TLocation;
|
|
323
|
+
private defaultName;
|
|
324
|
+
get name(): string;
|
|
325
|
+
set name(value: string);
|
|
326
|
+
private defaultImage?;
|
|
327
|
+
get image(): GraphicItemType | {
|
|
328
|
+
[key: string]: GraphicItemType;
|
|
329
|
+
} | undefined;
|
|
330
|
+
set image(value: GraphicItemType | {
|
|
331
|
+
[key: string]: GraphicItemType;
|
|
332
|
+
} | undefined);
|
|
333
|
+
private defaultActivityIds;
|
|
334
|
+
get defaultActivities(): ActivityRoom<this>[];
|
|
335
|
+
get activityIds(): string[];
|
|
336
|
+
get activities(): ActivityRoom<this>[];
|
|
337
|
+
getActivityMemory(id: string): object | undefined;
|
|
338
|
+
getActivity(id: string): ActivityRoom<this> | undefined;
|
|
339
|
+
setActivity(activity: ActivityRoom): void;
|
|
340
|
+
addActivity(activity: ActivityModel): void;
|
|
341
|
+
removeActivity(activity: ActivityModel | string): void;
|
|
342
|
+
clearExpiredActivities(): void;
|
|
343
|
+
private defaultDisabled;
|
|
344
|
+
get disabled(): boolean;
|
|
345
|
+
set disabled(value: boolean | string);
|
|
346
|
+
private defaultHidden;
|
|
347
|
+
get hidden(): boolean;
|
|
348
|
+
set hidden(value: boolean | string);
|
|
349
|
+
private _iconElement?;
|
|
350
|
+
get iconElement(): GraphicItemType | undefined;
|
|
351
|
+
getRoutine<TCommitment extends CommitmentBaseModel = CommitmentBaseModel>(): TCommitment[];
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
interface LocationBaseModelProps {
|
|
355
|
+
/**
|
|
356
|
+
* The name
|
|
357
|
+
*/
|
|
358
|
+
name?: string;
|
|
359
|
+
/**
|
|
360
|
+
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
361
|
+
*/
|
|
362
|
+
disabled?: boolean | string;
|
|
363
|
+
/**
|
|
364
|
+
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
365
|
+
*/
|
|
366
|
+
hidden?: boolean | string;
|
|
367
|
+
/**
|
|
368
|
+
* The icon element. Can be a string or an HTMLElement or a Pixi'VN CanvasItem
|
|
369
|
+
*/
|
|
370
|
+
iconElement?: GraphicItemType;
|
|
371
|
+
}
|
|
372
|
+
declare class LocationBaseModel<TMap extends MapBaseModel = MapBaseModel> extends StoredClassModel {
|
|
373
|
+
constructor(id: string, map: TMap, entrance: RoomBaseModel, props: LocationBaseModelProps);
|
|
374
|
+
private _entrance;
|
|
375
|
+
get entrance(): RoomBaseModel;
|
|
376
|
+
private defaultName;
|
|
377
|
+
get name(): string;
|
|
378
|
+
set name(value: string);
|
|
379
|
+
private defaultDisabled;
|
|
380
|
+
get disabled(): boolean;
|
|
381
|
+
set disabled(value: boolean | string);
|
|
382
|
+
private defaultHidden;
|
|
383
|
+
get hidden(): boolean;
|
|
384
|
+
set hidden(value: boolean | string);
|
|
385
|
+
private _iconElement?;
|
|
386
|
+
get iconElement(): GraphicItemType | undefined;
|
|
387
|
+
private _map;
|
|
388
|
+
get map(): TMap;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
interface GoalProps {
|
|
392
|
+
description: string;
|
|
393
|
+
need?: number;
|
|
394
|
+
have?: number;
|
|
395
|
+
}
|
|
396
|
+
interface IGoal {
|
|
397
|
+
description: string;
|
|
398
|
+
need: number;
|
|
399
|
+
have: number;
|
|
400
|
+
}
|
|
401
|
+
declare class Goal implements IGoal {
|
|
402
|
+
constructor(props: GoalProps);
|
|
403
|
+
private _description;
|
|
404
|
+
get description(): string;
|
|
405
|
+
need: number;
|
|
406
|
+
have: number;
|
|
407
|
+
get isComplete(): boolean;
|
|
408
|
+
setComplete(): void;
|
|
409
|
+
find(): void;
|
|
410
|
+
get export(): IGoal;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
type QuestsRequiredType<TQuest extends QuestBaseModel = QuestBaseModel> = {
|
|
414
|
+
quest: TQuest;
|
|
415
|
+
stageNumber: number;
|
|
416
|
+
} | TQuest;
|
|
417
|
+
|
|
418
|
+
interface StageBaseModelProps {
|
|
419
|
+
goals?: Goal[];
|
|
420
|
+
name?: string;
|
|
421
|
+
description?: string;
|
|
422
|
+
adviceDescription?: string;
|
|
423
|
+
image?: string;
|
|
424
|
+
daysRequiredToStart: number;
|
|
425
|
+
flagsRequired: string[];
|
|
426
|
+
questsRequired: QuestsRequiredType[];
|
|
427
|
+
requestDescription?: string;
|
|
428
|
+
onStart: () => void;
|
|
429
|
+
onEnd: () => void;
|
|
430
|
+
}
|
|
431
|
+
declare class StageBaseModel extends StoredClassModel {
|
|
432
|
+
constructor(id: string, props: StageBaseModelProps);
|
|
433
|
+
private _completed;
|
|
434
|
+
get completed(): boolean;
|
|
435
|
+
private _active;
|
|
436
|
+
get active(): boolean;
|
|
437
|
+
private defaultGoals;
|
|
438
|
+
get goals(): Goal[];
|
|
439
|
+
set goals(value: Goal[]);
|
|
440
|
+
private _name;
|
|
441
|
+
get name(): string;
|
|
442
|
+
private _description;
|
|
443
|
+
get description(): string;
|
|
444
|
+
private _adviceDescription;
|
|
445
|
+
get adviceDescription(): string;
|
|
446
|
+
private _image;
|
|
447
|
+
get image(): string;
|
|
448
|
+
private _daysRequiredToStart;
|
|
449
|
+
get daysRequiredToStart(): number;
|
|
450
|
+
private _flagsRequired;
|
|
451
|
+
get flagsRequired(): string[];
|
|
452
|
+
private _questsRequired;
|
|
453
|
+
get questsRequired(): QuestsRequiredType[];
|
|
454
|
+
private _requestDescription;
|
|
455
|
+
get requestDescription(): string;
|
|
456
|
+
private _onStart;
|
|
457
|
+
get onStart(): () => void;
|
|
458
|
+
private _onEnd;
|
|
459
|
+
get onEnd(): () => void;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
interface QuestBaseModelProps {
|
|
463
|
+
name?: string;
|
|
464
|
+
description?: string;
|
|
465
|
+
icon?: string;
|
|
466
|
+
image?: string;
|
|
467
|
+
isInDevelopment?: boolean;
|
|
468
|
+
}
|
|
469
|
+
declare class QuestBaseModel<TStage extends StageBaseModel = StageBaseModel> extends StoredClassModel {
|
|
470
|
+
constructor(id: string, stages: TStage[], props: QuestBaseModelProps);
|
|
471
|
+
private _stages;
|
|
472
|
+
get stages(): TStage[];
|
|
473
|
+
private _name;
|
|
474
|
+
get name(): string;
|
|
475
|
+
private _description;
|
|
476
|
+
get description(): string;
|
|
477
|
+
private _icon;
|
|
478
|
+
get icon(): string;
|
|
479
|
+
private _image;
|
|
480
|
+
get image(): string;
|
|
481
|
+
private _isInDevelopment;
|
|
482
|
+
get isInDevelopment(): boolean;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
declare function saveActivity(activity: ActivityModel | ActivityModel[]): void;
|
|
486
|
+
declare function getActivityById(id: string): ActivityModel | undefined;
|
|
487
|
+
|
|
488
|
+
declare function saveCommitment<TCommitment extends CommitmentBaseModel = CommitmentBaseModel>(commitment: TCommitment | TCommitment[]): void;
|
|
489
|
+
declare function getCommitmentById<TCommitment extends CommitmentBaseModel = CommitmentBaseModel>(id: string): TCommitment | undefined;
|
|
490
|
+
declare function setFixedCommitments<TCommitment extends CommitmentBaseModel = CommitmentBaseModel>(commitments: TCommitment[] | TCommitment): void;
|
|
491
|
+
declare function addTemporaryCommitment<TCommitment extends CommitmentBaseModel = CommitmentBaseModel>(commitment: TCommitment[] | TCommitment): void;
|
|
492
|
+
declare function getFixedCommitments<TCommitment extends CommitmentBaseModel = CommitmentBaseModel>(): TCommitment[];
|
|
493
|
+
declare function getTemporaryCommitments<TCommitment extends CommitmentBaseModel = CommitmentBaseModel>(): TCommitment[];
|
|
494
|
+
|
|
495
|
+
declare function saveRoom<TRoom extends RoomBaseModel = RoomBaseModel>(room: TRoom | TRoom[]): void;
|
|
496
|
+
declare function getRoomById<TRoom extends RoomBaseModel = RoomBaseModel>(id: string): TRoom | undefined;
|
|
497
|
+
|
|
498
|
+
declare function clearExpiredActivities(): void;
|
|
499
|
+
declare function currentActivities(): ActivityRoom[];
|
|
500
|
+
|
|
501
|
+
declare function setCurrentRoom<TRoom extends RoomBaseModel = RoomBaseModel>(room: TRoom): void;
|
|
502
|
+
declare function getCurrentRoom<TRoom extends RoomBaseModel = RoomBaseModel>(): TRoom | undefined;
|
|
503
|
+
declare function getCurrenrLocation<TLocation extends LocationBaseModel = LocationBaseModel>(): TLocation | undefined;
|
|
504
|
+
declare function getCueerntMap<TMap extends MapBaseModel = MapBaseModel>(): TMap | undefined;
|
|
505
|
+
|
|
506
|
+
declare function clearExpiredRoutine(): void;
|
|
507
|
+
declare function getCurrentCommitments<TCommitment extends CommitmentBaseModel = CommitmentBaseModel>(): TCommitment[];
|
|
508
|
+
declare function getCommitmentByCharacter<TCommitment extends CommitmentBaseModel = CommitmentBaseModel, TCharacter extends CharacterBaseModel = CharacterBaseModel>(character: TCharacter): TCommitment | undefined;
|
|
509
|
+
|
|
510
|
+
interface ITimeSettings {
|
|
511
|
+
minDayHour?: number;
|
|
512
|
+
maxDayHour?: number;
|
|
513
|
+
defaultTimeSpent?: number;
|
|
514
|
+
timeSlots?: ITimeStlot[];
|
|
515
|
+
weekLength?: number;
|
|
516
|
+
newDayHour?: number;
|
|
517
|
+
weekendStartDay?: number;
|
|
518
|
+
weekDaysNames?: string[];
|
|
519
|
+
}
|
|
520
|
+
interface ITimeStlot {
|
|
521
|
+
name: string;
|
|
522
|
+
startHour: number;
|
|
523
|
+
}
|
|
524
|
+
declare class TimeManager {
|
|
525
|
+
private constructor();
|
|
526
|
+
static set editSettings(value: ITimeSettings);
|
|
527
|
+
static get minDayHour(): number;
|
|
528
|
+
static get maxDayHour(): number;
|
|
529
|
+
static get defaultTimeSpent(): number;
|
|
530
|
+
static get newDayHour(): number;
|
|
531
|
+
static get timeSlots(): ITimeStlot[];
|
|
532
|
+
static get weekLength(): number;
|
|
533
|
+
static get weekendStartDay(): number;
|
|
534
|
+
static get weekDaysNames(): string[];
|
|
535
|
+
static get currentHour(): number;
|
|
536
|
+
static set currentHour(value: number | undefined);
|
|
537
|
+
static get currentDay(): number;
|
|
538
|
+
static set currentDay(value: number | undefined);
|
|
539
|
+
static get isWeekend(): boolean;
|
|
540
|
+
static get weekDayNumber(): number;
|
|
541
|
+
static get weekDayName(): string | undefined;
|
|
542
|
+
static newHour(timeSpent?: number): number;
|
|
543
|
+
static newDay(days?: number): number;
|
|
544
|
+
static nowIsBetween(fromHour: number, toHour: number): boolean;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
export { ActivityModel, type ActivityProps, ExecutionTypeEnum, TimeManager as GameStepManager, Goal, type GoalProps, type ITimeSettings, LocationBaseModel, type LocationBaseModelProps, MapBaseModel, type MapBaseModelProps, QuestBaseModel, type QuestBaseModelProps, type QuestsRequiredType, RoomBaseModel, type RoomBaseModelProps, StageBaseModel, type StageBaseModelProps, addTemporaryCommitment, clearExpiredActivities, clearExpiredRoutine, currentActivities, getActivityById, getCommitmentByCharacter, getCommitmentById, getCueerntMap, getCurrenrLocation, getCurrentCommitments, getCurrentRoom, getFixedCommitments, getRoomById, getTemporaryCommitments, saveActivity, saveCommitment, saveRoom, setCurrentRoom, setFixedCommitments };
|