@drincs/nqtr 0.8.2 → 1.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.
@@ -1,370 +1,97 @@
1
- import { OnRunProps as OnRunProps$1, ActivityInterface as ActivityInterface$1, CommitmentInterface as CommitmentInterface$1, LocationInterface as LocationInterface$1, MapInterface as MapInterface$1, RoomInterface as RoomInterface$1, QuestInterface as QuestInterface$1, StageInterface as StageInterface$1 } from '@drincs/nqtr';
2
- import { CharacterInterface, CachedMap } from '@drincs/pixi-vn';
3
- import { StoredClassModel } from '@drincs/pixi-vn/storage';
1
+ import { A as ActivityInterface, C as CommitmentInterface, h as LocationInterface, M as MapInterface, Q as QuestInterface, R as RoomInterface } from './StageInterface-BN_O8nDA.js';
2
+ import { CachedMap } from '@drincs/pixi-vn';
3
+ import '@drincs/pixi-vn/storage';
4
+ import '@drincs/nqtr/registries';
4
5
 
5
- interface DateSchedulingInterface {
6
- /**
7
- * The start date. If the item hasn't started yet, it will be hidden.
8
- * If you set it to 3, the item will be hidden on dates 1 and 2 and will be shown starting on date 3.
9
- */
10
- from: number;
11
- /**
12
- * The date when the item ends. If the item is ended yet, it will be deleted or hidden.
13
- * If you set { from: 0, to: 3 }, the item will be shown into dates 1 and 2 and will be deleted or hidden from date 3.
14
- * @default undefined
15
- */
16
- to?: number;
6
+ interface NqtrActivityIds {
17
7
  }
18
-
19
- interface TimeSchedulingInterface {
20
- /**
21
- * The time when the item starts. If the item is not started yet, it will be hidden.
22
- * If you set 3, the item will be hidden into times 1 and 2, and will be shown from time 3.
23
- */
24
- from: number;
25
- /**
26
- * The time when the item ends. If the item is ended yet, it will be hidden.
27
- * If you set 3, the item will be shown into times 1 and 2 and will be hidden from time 3.
28
- * @default timeTracker.dayEndTime + 1
29
- */
30
- to?: number;
8
+ interface NqtrCommitmentIds {
31
9
  }
32
-
33
- interface ActiveScheduling {
34
- /**
35
- * Time slot in which activity/commitment will be active.
36
- */
37
- readonly timeSlot?: TimeSchedulingInterface[] | TimeSchedulingInterface;
38
- /**
39
- * Used to schedule what date it will be added and removed.
40
- */
41
- readonly dateScheduling?: DateSchedulingInterface;
10
+ interface NqtrLocationIds {
42
11
  }
43
-
44
- type ExecutionType = "automatic" | "interaction";
45
-
46
- type OnRunProps = OnRunProps$1;
47
- /**
48
- * The function that is called when the class is runned.
49
- */
50
- type OnRunEvent<T> = (item: T, props: OnRunProps) => any | Promise<any>;
51
- type OnRunAsyncFunction = (props: OnRunProps) => Promise<any>;
52
-
53
- type QuestsRequiredType = {
54
- quest: QuestInterface;
55
- stageNumber: number;
56
- };
57
-
58
- interface ActivityInterface extends ActivityBaseInternalInterface, ActivityInterface$1 {
59
- }
60
- interface ActivityBaseInternalInterface extends ActiveScheduling {
61
- /**
62
- * The id of the activity/commitment.
63
- */
64
- readonly id: string;
65
- /**
66
- * The function that is called when the activity/commitment is runned.
67
- */
68
- readonly run: OnRunAsyncFunction;
69
- /**
70
- * Whether the activity/commitment is a deadline, so it will then be removed or hidden.
71
- *
72
- * It **depends only on the date**, not the time. So if you set { dateScheduling: { from: 0, to: 3 }, timeSlot { from: 10, to: 20 } } the activity/commitment hidden or deleted on date 3 at 0.
73
- */
74
- readonly expired: boolean;
75
- /**
76
- * Whether the activity/commitment is active, so it will be shown in the routine and can be runned.
77
- * @param options The options to check if the activity/commitment is active.
78
- */
79
- isActive(options?: ActiveScheduling): boolean;
80
- }
81
-
82
- interface CommitmentInterface extends CommitmentBaseInternalInterface, CommitmentInterface$1 {
83
- }
84
- interface CommitmentBaseInternalInterface extends ActivityBaseInternalInterface {
85
- /**
86
- * The character or characters that are in the commitment and so in the room.
87
- */
88
- readonly characters: CharacterInterface[];
89
- /**
90
- * 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.
91
- * If you set "automatic" remember to remove the commitment when it is no longer needed, because otherwise it repeats itself every time.
92
- */
93
- executionType: ExecutionType;
94
- /**
95
- * The priority. The higher the number, the higher the priority.
96
- * To ensure that a character is not in 2 places at the same time, if there are 2 or more valid commits at the same time and with the same character, the one with the highest priority will be chosen.
97
- */
98
- priority: number;
99
- }
100
-
101
- interface NavigationAbstractInterface extends StoredClassModel {
102
- /**
103
- * Connects the activity to the class.
104
- * @param activity The activity to connect to the class.
105
- * @param options
106
- * @returns
107
- */
108
- addActivity(activity: ActivityInterface, options?: ActiveScheduling): void;
109
- /**
110
- * Disconnects the activity from the class.
111
- * @param activity The activity to disconnect from the class.
112
- * @param options
113
- */
114
- removeActivity(activity: ActivityInterface | string): void;
115
- /**
116
- * Removes the useless activities.
117
- */
118
- clearExpiredActivities(): void;
119
- /**
120
- * All the ids of the activities associated with this class. Compared to {@link activities}, they are not filtered based on their scheduling.
121
- */
122
- readonly activitiesIds: string[];
123
- /**
124
- * The activities associated with this class, filtered based on their scheduling.
125
- */
126
- activities: ActivityInterface[];
127
- }
128
-
129
- interface LocationInterface extends LocationInternalInterface, LocationInterface$1 {
130
- }
131
- interface LocationInternalInterface extends NavigationAbstractInterface {
132
- /**
133
- * The id of the location.
134
- */
135
- readonly id: string;
136
- /**
137
- * The map where the location is.
138
- */
139
- readonly map: MapInterface;
140
- /**
141
- * Get all rooms in the location.
142
- * @returns The rooms in the location.
143
- */
144
- readonly rooms: RoomInterface[];
145
- }
146
-
147
- interface MapInterface extends MapBaseInternalInterface, MapInterface$1 {
148
- }
149
- interface MapBaseInternalInterface extends NavigationAbstractInterface {
150
- /**
151
- * The id of the map.
152
- */
153
- readonly id: string;
154
- /**
155
- * Get all locations in the map.
156
- * @returns The locations in the map.
157
- */
158
- readonly locations: LocationInterface[];
159
- }
160
-
161
- interface RoomInterface extends RoomBaseInternalInterface, RoomInterface$1 {
162
- }
163
- interface RoomBaseInternalInterface extends NavigationAbstractInterface {
164
- /**
165
- * The id of the room.
166
- */
167
- readonly id: string;
168
- /**
169
- * The location where the room is.
170
- */
171
- readonly location: LocationInterface;
172
- /**
173
- * Connects the commitment to the class.
174
- * @param commitment The commitment to connect to the class.
175
- * @param options
176
- * @returns
177
- */
178
- addCommitment(commitment: CommitmentInterface, options?: ActiveScheduling): void;
179
- /**
180
- * Disconnects the commitment from the class.
181
- * @param commitment The commitment to disconnect from the class.
182
- * @param options
183
- */
184
- removeCommitment(commitment: CommitmentInterface | string): void;
185
- /**
186
- * Get the character commitments of the room.
187
- */
188
- readonly routine: CommitmentInterface[];
189
- /**
190
- * Get the characters in the room.
191
- */
192
- readonly characters: CharacterInterface[];
193
- /**
194
- * Get the functions that will be executed when the room is visited.
195
- */
196
- readonly automaticFunctions: OnRunAsyncFunction[];
197
- }
198
-
199
- interface QuestInterface extends QuestBaseInternalInterface, QuestInterface$1 {
200
- }
201
- interface QuestBaseInternalInterface {
202
- /**
203
- * The id of the quest.
204
- */
205
- readonly id: string;
206
- /**
207
- * The stages of the quest.
208
- */
209
- readonly stages: StageInterface[];
210
- /**
211
- * The index of the current stage.
212
- */
213
- currentStageIndex?: number;
214
- /**
215
- * The current stage.
216
- */
217
- readonly currentStage?: StageInterface;
218
- /**
219
- * If the quest is started.
220
- */
221
- readonly started: boolean;
222
- /**
223
- * If the quest is started and not completed and not failed.
224
- */
225
- readonly inProgress: boolean;
226
- /**
227
- * If the quest is completed.
228
- */
229
- readonly completed: boolean;
230
- /**
231
- * If the quest is failed.
232
- */
233
- readonly failed: boolean;
234
- /**
235
- * The function that will be called when the quest starts.
236
- */
237
- readonly onStart?: OnRunEvent<QuestInterface>;
238
- /**
239
- * @deprecated Use {@link onContinue} instead. The function that will be called when the quest goes to the next stage.
240
- */
241
- readonly onNextStage?: OnRunEvent<QuestInterface>;
242
- /**
243
- * The function that will be called when the quest goes to the next stage.
244
- */
245
- readonly onContinue?: OnRunEvent<QuestInterface>;
246
- /**
247
- * Start the quest.
248
- * @param props The properties for the start stage. If you not want to pass any property, you can pass an {}.
249
- * @returns
250
- */
251
- start(props: OnRunProps$1): Promise<void>;
252
- /**
253
- * Go to the next stage if the current stage is completed.
254
- * If you want to force the change of stage, use {@link advanceUnconditionally}.
255
- * @param props The properties. If you not want to pass any property, you can pass an {}.
256
- * @returns true if the stage was changed, false otherwise.
257
- */
258
- advanceIfCompleted(props: OnRunProps$1): Promise<boolean>;
259
- /**
260
- * Complete the current stage and go to the next stage with {@link advanceUnconditionally}.
261
- * If you want to go to the next stage only if the current stage is completed, use {@link advanceIfCompleted}.
262
- * @param props The properties. If you not want to pass any property, you can pass an {}.
263
- * @returns true if the stage was changed, false otherwise.
264
- */
265
- continue(props: OnRunProps$1): Promise<boolean>;
266
- /**
267
- * Ignore the completed state of the current stage and go to the next stage without checking if the current stage is completed.
268
- * If you want to go to the next stage only if the current stage is completed, use {@link advanceIfCompleted}.
269
- * @param props The properties. If you not want to pass any property, you can pass an {}.
270
- * @returns returns true if the stage was changed, false otherwise.
271
- */
272
- advanceUnconditionally(props: OnRunProps$1): Promise<boolean>;
273
- /**
274
- * If the current stage must start. It is true if the current stage is not started, can start and not completed.
275
- */
276
- readonly currentStageMustStart: boolean;
277
- /**
278
- * Start the current stage. This is a system function, do not use it directly.
279
- * @param props The properties for the start stage. If you not want to pass any property, you can pass an {}.
280
- */
281
- startCurrentStage(props: OnRunProps$1): Promise<void>;
12
+ interface NqtrMapIds {
282
13
  }
283
-
284
- interface StageInterface extends StageBaseInternalInterface, StageInterface$1 {
14
+ interface NqtrQuestIds {
285
15
  }
286
- interface StageBaseInternalInterface {
287
- /**
288
- * The id of the stage.
289
- */
290
- readonly id: string;
291
- /**
292
- * The function that will be called when the stage starts.
293
- */
294
- readonly onStart?: OnRunEvent<StageInterface>;
295
- /**
296
- * The function that will be called when the stage ends.
297
- */
298
- readonly onEnd?: OnRunEvent<StageInterface>;
299
- /**
300
- * Check if the flag and goals are completed.
301
- * You can force the completion of the stage by setting the completed property to true.
302
- * @example
303
- * ```ts
304
- * export default class Stage extends StageStoredClass {
305
- * override get completed(): boolean {
306
- * if (super.completed) {
307
- * return true;
308
- * }
309
- * if (this.flags.length > 0) {
310
- * if (!this.flags.every((flag) => storage.getFlag(flag.flag))) {
311
- * return false;
312
- * }
313
- * return true;
314
- * }
315
- * return false;
316
- * }
317
- * override set completed(value: boolean) {
318
- * super.completed = value;
319
- * }
320
- * }
321
- * ```
322
- */
323
- completed: boolean;
324
- /**
325
- * If the stage is started.
326
- */
327
- started: boolean;
328
- /**
329
- * The date when the stage starts.
330
- */
331
- readonly startDate?: number;
332
- /**
333
- * Check if the stage can start.
334
- * @example
335
- * ```ts
336
- * export default class Stage extends StageStoredClass {
337
- * override get canStart(): boolean {
338
- * if (this.flagsRequired.length > 0 && !this.flagsRequired.every((flag) => storage.getFlag(flag.flag))) {
339
- * return false;
340
- * }
341
- * return super.canStart;
342
- * }
343
- * }
344
- * ```
345
- */
346
- readonly canStart: boolean;
347
- /**
348
- * The function that will be called when the stage starts.
349
- */
350
- start(props: OnRunProps$1): Promise<void>;
351
- /**
352
- * The number of day/date required to start the stage.
353
- */
354
- readonly deltaDateRequired: number;
355
- /**
356
- * The list of quests required to start the stage.
357
- */
358
- readonly questsRequired: QuestsRequiredType[];
16
+ interface NqtrRoomIds {
359
17
  }
18
+ /**
19
+ * The type used wherever an activity ID is expected.
20
+ *
21
+ * - **Default** — resolves to `string` so that existing code compiles without changes.
22
+ * - **Augmented** — when {@link NqtrActivityIds} has been extended via
23
+ * `declare module "@drincs/nqtr/registries"`, resolves to the union of known activity IDs.
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * // nqtr.gen.d.ts (auto-generated by vitePluginNqtr)
28
+ * declare module "@drincs/nqtr/registries" {
29
+ * interface NqtrActivityIds { "study": never; "cook": never; }
30
+ * }
31
+ * ```
32
+ */
33
+ type ActivityIdType = [keyof NqtrActivityIds] extends [never] ? string : keyof NqtrActivityIds;
34
+ /**
35
+ * The type used wherever a commitment ID is expected.
36
+ *
37
+ * - **Default** — resolves to `string`.
38
+ * - **Augmented** — resolves to the union of known commitment IDs once
39
+ * {@link NqtrCommitmentIds} has been extended.
40
+ */
41
+ type CommitmentIdType = [keyof NqtrCommitmentIds] extends [never] ? string : keyof NqtrCommitmentIds;
42
+ /**
43
+ * The type used wherever a location ID is expected.
44
+ *
45
+ * - **Default** — resolves to `string`.
46
+ * - **Augmented** — resolves to the union of known location IDs once
47
+ * {@link NqtrLocationIds} has been extended.
48
+ */
49
+ type LocationIdType = [keyof NqtrLocationIds] extends [never] ? string : keyof NqtrLocationIds;
50
+ /**
51
+ * The type used wherever a map ID is expected.
52
+ *
53
+ * - **Default** — resolves to `string`.
54
+ * - **Augmented** — resolves to the union of known map IDs once
55
+ * {@link NqtrMapIds} has been extended.
56
+ */
57
+ type MapIdType = [keyof NqtrMapIds] extends [never] ? string : keyof NqtrMapIds;
58
+ /**
59
+ * The type used wherever a quest ID is expected.
60
+ *
61
+ * - **Default** — resolves to `string`.
62
+ * - **Augmented** — resolves to the union of known quest IDs once
63
+ * {@link NqtrQuestIds} has been extended.
64
+ */
65
+ type QuestIdType = [keyof NqtrQuestIds] extends [never] ? string : keyof NqtrQuestIds;
66
+ /**
67
+ * The type used wherever a room ID is expected.
68
+ *
69
+ * - **Default** — resolves to `string`.
70
+ * - **Augmented** — resolves to the union of known room IDs once
71
+ * {@link NqtrRoomIds} has been extended.
72
+ *
73
+ * @example
74
+ * ```ts
75
+ * import type { RoomIdType } from "@drincs/nqtr/registries";
76
+ *
77
+ * function navigateTo(roomId: RoomIdType) { ... }
78
+ * navigateTo("bedroom"); // ✅ compile error if "bedroom" is not a known room
79
+ * ```
80
+ */
81
+ type RoomIdType = [keyof NqtrRoomIds] extends [never] ? string : keyof NqtrRoomIds;
360
82
 
83
+ /**
84
+ * A Map that contains all activities registered and available to be used.
85
+ * The key is the id of the activity and the value is the activity itself.
86
+ */
87
+ declare const registeredActivities: CachedMap<string, ActivityInterface>;
361
88
  declare namespace RegisteredActivities {
362
89
  /**
363
90
  * Save an activity in the registered activities. If the activity already exists, it will be overwritten.
364
- * @param activity The activity to save.
91
+ * @param activities The activity to save.
365
92
  * @returns
366
93
  */
367
- function add(activities: ActivityInterface | ActivityInterface[]): void;
94
+ function add(...activities: (ActivityInterface | ActivityInterface[])[]): void;
368
95
  /**
369
96
  * Get an activity by its id.
370
97
  * @param id The id of the activity.
@@ -382,6 +109,11 @@ declare namespace RegisteredActivities {
382
109
  * @returns True if the activity is registered, false otherwise.
383
110
  */
384
111
  function has(id: string): boolean;
112
+ /**
113
+ * Remove all registered activities.
114
+ * Primarily used by the Vite plugin to reset state between hot-module reloads.
115
+ */
116
+ function clear(): void;
385
117
  }
386
118
 
387
119
  /**
@@ -389,14 +121,14 @@ declare namespace RegisteredActivities {
389
121
  * The key is the id of the commitment and the value is the commitment itself.
390
122
  */
391
123
  declare const registeredCommitments: CachedMap<string, CommitmentInterface>;
392
- declare const fixedCommitments: CachedMap<string, [CommitmentInterface, string]>;
124
+ declare const fixedCommitments: CachedMap<string, string>;
393
125
  declare namespace RegisteredCommitments {
394
126
  /**
395
127
  * Save a commitment in the registered commitments. If the commitment already exists, it will be overwritten.
396
- * @param commitment The commitment to save.
128
+ * @param commitments The commitment to save.
397
129
  * @returns
398
130
  */
399
- function add(commitments: CommitmentInterface | CommitmentInterface[]): void;
131
+ function add(...commitments: (CommitmentInterface | CommitmentInterface[])[]): void;
400
132
  /**
401
133
  * Get a commitment by its id.
402
134
  * @param id The id of the commitment.
@@ -414,15 +146,25 @@ declare namespace RegisteredCommitments {
414
146
  * @returns True if the commitment is registered, false otherwise.
415
147
  */
416
148
  function has(id: string): boolean;
149
+ /**
150
+ * Remove all registered commitments (both scheduled and fixed).
151
+ * Primarily used by the Vite plugin to reset state between hot-module reloads.
152
+ */
153
+ function clear(): void;
417
154
  }
418
155
 
156
+ /**
157
+ * A Map that contains all locations registered and available to be used.
158
+ * The key is the id of the location and the value is the location itself.
159
+ */
160
+ declare const registeredLocations: CachedMap<string, LocationInterface>;
419
161
  declare namespace RegisteredLocations {
420
162
  /**
421
163
  * Save a location in the registered locations. If the location already exists, it will be overwritten.
422
- * @param location The location to save.
164
+ * @param locations The location to save.
423
165
  * @returns
424
166
  */
425
- function add(location: LocationInterface | LocationInterface[]): void;
167
+ function add(...locations: (LocationInterface | LocationInterface[])[]): void;
426
168
  /**
427
169
  * Get a location by its id.
428
170
  * @param id The id of the location.
@@ -440,15 +182,25 @@ declare namespace RegisteredLocations {
440
182
  * @returns True if the location is registered, false otherwise.
441
183
  */
442
184
  function has(id: string): boolean;
185
+ /**
186
+ * Remove all registered locations.
187
+ * Primarily used by the Vite plugin to reset state between hot-module reloads.
188
+ */
189
+ function clear(): void;
443
190
  }
444
191
 
192
+ /**
193
+ * A Map that contains all maps registered and available to be used.
194
+ * The key is the id of the map and the value is the map itself.
195
+ */
196
+ declare const registeredMaps: CachedMap<string, MapInterface>;
445
197
  declare namespace RegisteredMaps {
446
198
  /**
447
199
  * Save a map in the registered maps. If the map already exists, it will be overwritten.
448
- * @param map The map to save.
200
+ * @param maps The map to save.
449
201
  * @returns
450
202
  */
451
- function add(map: MapInterface | MapInterface[]): void;
203
+ function add(...maps: (MapInterface | MapInterface[])[]): void;
452
204
  /**
453
205
  * Get a map by its id.
454
206
  * @param id The id of the map.
@@ -466,15 +218,25 @@ declare namespace RegisteredMaps {
466
218
  * @returns True if the map is registered, false otherwise.
467
219
  */
468
220
  function has(id: string): boolean;
221
+ /**
222
+ * Remove all registered maps.
223
+ * Primarily used by the Vite plugin to reset state between hot-module reloads.
224
+ */
225
+ function clear(): void;
469
226
  }
470
227
 
228
+ /**
229
+ * A Map that contains all quests registered and available to be used.
230
+ * The key is the id of the quest and the value is the quest itself.
231
+ */
232
+ declare const registeredQuests: CachedMap<string, QuestInterface>;
471
233
  declare namespace RegisteredQuest {
472
234
  /**
473
235
  * Save a quest in the registered quests. If the quest already exists, it will be overwritten.
474
- * @param quest The quest to save.
236
+ * @param quests The quest to save.
475
237
  * @returns
476
238
  */
477
- function add(quests: QuestInterface | QuestInterface[]): void;
239
+ function add(...quests: (QuestInterface | QuestInterface[])[]): void;
478
240
  /**
479
241
  * Get a quest by its id.
480
242
  * @param id The id of the quest.
@@ -492,16 +254,26 @@ declare namespace RegisteredQuest {
492
254
  * @returns True if the quest is registered, false otherwise.
493
255
  */
494
256
  function has(id: string): boolean;
257
+ /**
258
+ * Remove all registered quests.
259
+ * Primarily used by the Vite plugin to reset state between hot-module reloads.
260
+ */
261
+ function clear(): void;
495
262
  }
496
263
 
264
+ /**
265
+ * A Map that contains all rooms registered and available to be used.
266
+ * The key is the id of the room and the value is the room itself.
267
+ */
268
+ declare const registeredRooms: CachedMap<string, RoomInterface>;
497
269
  declare namespace RegisteredRooms {
498
270
  /**
499
271
  * Save a room in the registered rooms, and their location and map if they are not already registered.
500
272
  * If the room already exists, it will be overwritten.
501
- * @param room The room to save.
273
+ * @param rooms The room to save.
502
274
  * @returns
503
275
  */
504
- function add(room: RoomInterface | RoomInterface[]): void;
276
+ function add(...rooms: (RoomInterface | RoomInterface[])[]): void;
505
277
  /**
506
278
  * Get a room by its id.
507
279
  * @param id The id of the room.
@@ -519,6 +291,11 @@ declare namespace RegisteredRooms {
519
291
  * @returns True if the room is registered, false otherwise.
520
292
  */
521
293
  function has(id: string): boolean;
294
+ /**
295
+ * Remove all registered rooms.
296
+ * Primarily used by the Vite plugin to reset state between hot-module reloads.
297
+ */
298
+ function clear(): void;
522
299
  }
523
300
 
524
- export { RegisteredActivities, RegisteredCommitments, RegisteredLocations, RegisteredMaps, RegisteredQuest as RegisteredQuests, RegisteredRooms, fixedCommitments, registeredCommitments };
301
+ export { type ActivityIdType, type CommitmentIdType, type LocationIdType, type MapIdType, type NqtrActivityIds, type NqtrCommitmentIds, type NqtrLocationIds, type NqtrMapIds, type NqtrQuestIds, type NqtrRoomIds, type QuestIdType, RegisteredActivities, RegisteredCommitments, RegisteredLocations, RegisteredMaps, RegisteredQuest as RegisteredQuests, RegisteredRooms, type RoomIdType, fixedCommitments, registeredActivities, registeredCommitments, registeredLocations, registeredMaps, registeredQuests, registeredRooms };
@@ -1 +1 @@
1
- import {CachedMap}from'@drincs/pixi-vn';var t;(n=>(n.log=(e,...r)=>console.log(`[NQTR] ${e}`,...r),n.warn=(e,...r)=>console.warn(`[NQTR] ${e}`,...r),n.error=(e,...r)=>console.error(`[NQTR] ${e}`,...r),n.info=(e,...r)=>console.info(`[NQTR] ${e}`,...r)))(t||(t={}));var s=new CachedMap({cacheSize:20}),g;(n=>{function o(e){if(Array.isArray(e)){e.forEach(r=>n.add(r));return}s.set(e.id,e);}n.add=o;function a(e){try{let r=s.get(e);if(!r){console.warn(`[NQTR] Activity ${e} not found, you should register it first`);return}return r}catch(r){t.error(`Error while getting Activity ${e}`,r);return}}n.get=a;function i(){return Array.from(s.values())}n.values=i;function f(e){return s.has(e)}n.has=f;})(g||(g={}));var M=g;var c=new CachedMap({cacheSize:20}),$=new CachedMap({cacheSize:20}),l;(n=>{function o(e){if(Array.isArray(e)){e.forEach(r=>n.add(r));return}c.set(e.id,e);}n.add=o;function a(e){try{let r=c.get(e);if(!r){console.warn(`[NQTR] Commitment ${e} not found, you should register it first`);return}return r}catch(r){t.error(`Error while getting Commitment ${e}`,r);return}}n.get=a;function i(){return Array.from(c.values())}n.values=i;function f(e){return c.has(e)}n.has=f;})(l||(l={}));var E=l;var u=new CachedMap({cacheSize:20}),y;(n=>{function o(e){if(Array.isArray(e)){e.forEach(r=>o(r));return}u.set(e.id,e);}n.add=o;function a(e){try{let r=u.get(e);if(!r){console.warn(`[NQTR] Location ${e} not found, you should register it first`);return}return r}catch(r){t.error(`Error while getting Location ${e}`,r);return}}n.get=a;function i(){return Array.from(u.values())}n.values=i;function f(e){return u.has(e)}n.has=f;})(y||(y={}));var h=y;var m=new CachedMap({cacheSize:20}),x;(n=>{function o(e){if(Array.isArray(e)){e.forEach(r=>o(r));return}m.set(e.id,e);}n.add=o;function a(e){try{let r=m.get(e);if(!r){console.warn(`[NQTR] Map ${e} not found, you should register it first`);return}return r}catch(r){t.error(`Error while getting Map ${e}`,r);return}}n.get=a;function i(){return Array.from(m.values())}n.values=i;function f(e){return m.has(e)}n.has=f;})(x||(x={}));var I=x;var p=new CachedMap({cacheSize:5}),A;(n=>{function o(e){if(Array.isArray(e)){e.forEach(r=>n.add(r));return}p.set(e.id,e);}n.add=o;function a(e){try{let r=p.get(e);if(!r){console.warn(`[NQTR] Quest ${e} not found, you should register it first`);return}return r}catch(r){t.error(`Error while getting Quest ${e}`,r);return}}n.get=a;function i(){return Array.from(p.values())}n.values=i;function f(e){return p.has(e)}n.has=f;})(A||(A={}));var z=A;var d=new CachedMap({cacheSize:20}),w;(n=>{function o(e){if(Array.isArray(e)){e.forEach(C=>o(C));return}d.set(e.id,e);let r=e.location;h.add(r);let R=r?.map;R&&I.add(R);}n.add=o;function a(e){try{let r=d.get(e);if(!r){console.warn(`[NQTR] Room ${e} not found, you should register it first`);return}return r}catch(r){t.error(`Error while getting Room ${e}`,r);return}}n.get=a;function i(){return Array.from(d.values())}n.values=i;function f(e){return d.has(e)}n.has=f;})(w||(w={}));var b=w;export{M as RegisteredActivities,E as RegisteredCommitments,h as RegisteredLocations,I as RegisteredMaps,z as RegisteredQuests,b as RegisteredRooms,$ as fixedCommitments,c as registeredCommitments};
1
+ import {CachedMap}from'@drincs/pixi-vn';var o;(i=>(i.log=(r,...t)=>console.log(`[NQTR] ${r}`,...t),i.warn=(r,...t)=>console.warn(`[NQTR] ${r}`,...t),i.error=(r,...t)=>console.error(`[NQTR] ${r}`,...t),i.info=(r,...t)=>console.info(`[NQTR] ${r}`,...t)))(o||={});var f=new CachedMap({cacheSize:20}),h;(r=>{function n(...t){for(let e of t){if(Array.isArray(e)){n(...e);continue}f.set(e.id,e);}}r.add=n;function a(t){try{let e=f.get(t);if(!e){console.warn(`[NQTR] Activity ${t} not found, you should register it first`);return}return e}catch(e){o.error(`Error while getting Activity ${t}`,e);return}}r.get=a;function c(){return Array.from(f.values())}r.values=c;function s(t){return f.has(t)}r.has=s;function i(){f.clear();}r.clear=i;})(h||={});var T=h;var m=new CachedMap({cacheSize:20}),A=new CachedMap({cacheSize:20}),R;(r=>{function n(...t){for(let e of t){if(Array.isArray(e)){n(...e);return}m.set(e.id,e);}}r.add=n;function a(t){try{let e=m.get(t);if(!e){console.warn(`[NQTR] Commitment ${t} not found, you should register it first`);return}return e}catch(e){o.error(`Error while getting Commitment ${t}`,e);return}}r.get=a;function c(){return Array.from(m.values())}r.values=c;function s(t){return m.has(t)}r.has=s;function i(){m.clear(),A.clear();}r.clear=i;})(R||={});var $=R;var u=new CachedMap({cacheSize:20}),Q;(r=>{function n(...t){for(let e of t){if(Array.isArray(e)){n(...e);return}u.set(e.id,e);}}r.add=n;function a(t){try{let e=u.get(t);if(!e){console.warn(`[NQTR] Location ${t} not found, you should register it first`);return}return e}catch(e){o.error(`Error while getting Location ${t}`,e);return}}r.get=a;function c(){return Array.from(u.values())}r.values=c;function s(t){return u.has(t)}r.has=s;function i(){u.clear();}r.clear=i;})(Q||={});var l=Q;var p=new CachedMap({cacheSize:20}),w;(r=>{function n(...t){for(let e of t){if(Array.isArray(e)){n(...e);return}p.set(e.id,e);}}r.add=n;function a(t){try{let e=p.get(t);if(!e){console.warn(`[NQTR] Map ${t} not found, you should register it first`);return}return e}catch(e){o.error(`Error while getting Map ${t}`,e);return}}r.get=a;function c(){return Array.from(p.values())}r.values=c;function s(t){return p.has(t)}r.has=s;function i(){p.clear();}r.clear=i;})(w||={});var y=w;var d=new CachedMap({cacheSize:5}),C;(r=>{function n(...t){for(let e of t){if(Array.isArray(e)){n(...e);return}d.set(e.id,e);}}r.add=n;function a(t){try{let e=d.get(t);if(!e){console.warn(`[NQTR] Quest ${t} not found, you should register it first`);return}return e}catch(e){o.error(`Error while getting Quest ${t}`,e);return}}r.get=a;function c(){return Array.from(d.values())}r.values=c;function s(t){return d.has(t)}r.has=s;function i(){d.clear();}r.clear=i;})(C||={});var S=C;var g=new CachedMap({cacheSize:20}),M;(r=>{function n(...t){for(let e of t){if(Array.isArray(e)){n(...e);return}g.set(e.id,e);let x=e.location;l.add(x);let I=x?.map;I&&y.add(I);}}r.add=n;function a(t){try{let e=g.get(t);if(!e){console.warn(`[NQTR] Room ${t} not found, you should register it first`);return}return e}catch(e){o.error(`Error while getting Room ${t}`,e);return}}r.get=a;function c(){return Array.from(g.values())}r.values=c;function s(t){return g.has(t)}r.has=s;function i(){g.clear();}r.clear=i;})(M||={});var E=M;export{T as RegisteredActivities,$ as RegisteredCommitments,l as RegisteredLocations,y as RegisteredMaps,S as RegisteredQuests,E as RegisteredRooms,A as fixedCommitments,f as registeredActivities,m as registeredCommitments,u as registeredLocations,p as registeredMaps,d as registeredQuests,g as registeredRooms};