@drincs/nqtr 0.6.0 → 0.7.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/dist/handlers.cjs +1 -0
- package/dist/handlers.d.mts +606 -0
- package/dist/handlers.d.ts +606 -0
- package/dist/handlers.mjs +1 -0
- package/dist/index.cjs +1 -2
- package/dist/index.d.mts +1391 -23
- package/dist/index.d.ts +1391 -23
- package/dist/index.mjs +1 -2
- package/dist/ink.cjs +1 -0
- package/dist/ink.d.mts +17 -0
- package/dist/ink.d.ts +17 -0
- package/dist/ink.mjs +1 -0
- package/dist/registries.cjs +1 -0
- package/dist/registries.d.mts +516 -0
- package/dist/registries.d.ts +516 -0
- package/dist/registries.mjs +1 -0
- package/package.json +40 -8
- package/dist/RoomInterface-BhP3JgjH.d.ts +0 -182
- package/dist/RoomInterface-V1-hwph_.d.mts +0 -182
- package/dist/StageInterface-v96_K9Tg.d.mts +0 -188
- package/dist/StageInterface-v96_K9Tg.d.ts +0 -188
- package/dist/classes/index.cjs +0 -2
- package/dist/classes/index.cjs.map +0 -1
- package/dist/classes/index.d.mts +0 -515
- package/dist/classes/index.d.ts +0 -515
- package/dist/classes/index.mjs +0 -2
- package/dist/classes/index.mjs.map +0 -1
- package/dist/decorators/index.cjs +0 -2
- package/dist/decorators/index.cjs.map +0 -1
- package/dist/decorators/index.d.mts +0 -164
- package/dist/decorators/index.d.ts +0 -164
- package/dist/decorators/index.mjs +0 -2
- package/dist/decorators/index.mjs.map +0 -1
- package/dist/index-B8O3zxyP.d.ts +0 -269
- package/dist/index-BgY2U2li.d.mts +0 -199
- package/dist/index-CzOd-Rin.d.mts +0 -269
- package/dist/index-cbTx3r0P.d.ts +0 -199
- package/dist/index.cjs.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/interface/index.cjs +0 -2
- package/dist/interface/index.cjs.map +0 -1
- package/dist/interface/index.d.mts +0 -6
- package/dist/interface/index.d.ts +0 -6
- package/dist/interface/index.mjs +0 -2
- package/dist/interface/index.mjs.map +0 -1
- package/dist/managers/index.cjs +0 -2
- package/dist/managers/index.cjs.map +0 -1
- package/dist/managers/index.d.mts +0 -7
- package/dist/managers/index.d.ts +0 -7
- package/dist/managers/index.mjs +0 -2
- package/dist/managers/index.mjs.map +0 -1
- package/dist/types/index.cjs +0 -2
- package/dist/types/index.cjs.map +0 -1
- package/dist/types/index.d.mts +0 -65
- package/dist/types/index.d.ts +0 -65
- package/dist/types/index.mjs +0 -2
- package/dist/types/index.mjs.map +0 -1
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import { A as ActivityInterface, C as CommitmentInterface, L as LocationInterface, M as MapInterface, R as RoomInterface } from '../RoomInterface-BhP3JgjH.js';
|
|
2
|
-
import { Q as QuestInterface } from '../StageInterface-v96_K9Tg.js';
|
|
3
|
-
import '@drincs/nqtr';
|
|
4
|
-
import '@drincs/pixi-vn';
|
|
5
|
-
import '@drincs/pixi-vn/storage';
|
|
6
|
-
|
|
7
|
-
declare namespace RegisteredActivities {
|
|
8
|
-
/**
|
|
9
|
-
* Save an activity in the registered activities. If the activity already exists, it will be overwritten.
|
|
10
|
-
* @param activity The activity to save.
|
|
11
|
-
* @returns
|
|
12
|
-
*/
|
|
13
|
-
function add(activities: ActivityInterface | ActivityInterface[]): void;
|
|
14
|
-
/**
|
|
15
|
-
* Get an activity by its id.
|
|
16
|
-
* @param id The id of the activity.
|
|
17
|
-
* @returns The activity or undefined if not found.
|
|
18
|
-
*/
|
|
19
|
-
function get(id: string): ActivityInterface | undefined;
|
|
20
|
-
/**
|
|
21
|
-
* Get a list of all activities registered.
|
|
22
|
-
* @returns An array of activities.
|
|
23
|
-
*/
|
|
24
|
-
function values(): ActivityInterface[];
|
|
25
|
-
/**
|
|
26
|
-
* Check if an activity is registered.
|
|
27
|
-
* @param id The id of the activity.
|
|
28
|
-
* @returns True if the activity is registered, false otherwise.
|
|
29
|
-
*/
|
|
30
|
-
function has(id: string): boolean;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
declare namespace RegisteredCommitments {
|
|
34
|
-
/**
|
|
35
|
-
* Save a commitment in the registered commitments. If the commitment already exists, it will be overwritten.
|
|
36
|
-
* @param commitment The commitment to save.
|
|
37
|
-
* @returns
|
|
38
|
-
*/
|
|
39
|
-
function add(commitments: CommitmentInterface | CommitmentInterface[]): void;
|
|
40
|
-
/**
|
|
41
|
-
* Get a commitment by its id.
|
|
42
|
-
* @param id The id of the commitment.
|
|
43
|
-
* @returns The commitment or undefined if not found.
|
|
44
|
-
*/
|
|
45
|
-
function get(id: string): CommitmentInterface | undefined;
|
|
46
|
-
/**
|
|
47
|
-
* Get a list of all commitments registered.
|
|
48
|
-
* @returns An array of commitments.
|
|
49
|
-
*/
|
|
50
|
-
function values(): CommitmentInterface[];
|
|
51
|
-
/**
|
|
52
|
-
* Check if a commitment is registered.
|
|
53
|
-
* @param id The id of the commitment.
|
|
54
|
-
* @returns True if the commitment is registered, false otherwise.
|
|
55
|
-
*/
|
|
56
|
-
function has(id: string): boolean;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
declare namespace RegisteredLocations {
|
|
60
|
-
/**
|
|
61
|
-
* Save a location in the registered locations. If the location already exists, it will be overwritten.
|
|
62
|
-
* @param location The location to save.
|
|
63
|
-
* @returns
|
|
64
|
-
*/
|
|
65
|
-
function add(location: LocationInterface | LocationInterface[]): void;
|
|
66
|
-
/**
|
|
67
|
-
* Get a location by its id.
|
|
68
|
-
* @param id The id of the location.
|
|
69
|
-
* @returns The location or undefined if not found.
|
|
70
|
-
*/
|
|
71
|
-
function get(id: string): LocationInterface | undefined;
|
|
72
|
-
/**
|
|
73
|
-
* Get a list of all locations registered.
|
|
74
|
-
* @returns An array of locations.
|
|
75
|
-
*/
|
|
76
|
-
function values(): LocationInterface[];
|
|
77
|
-
/**
|
|
78
|
-
* Check if a location is registered.
|
|
79
|
-
* @param id The id of the location.
|
|
80
|
-
* @returns True if the location is registered, false otherwise.
|
|
81
|
-
*/
|
|
82
|
-
function has(id: string): boolean;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
declare namespace RegisteredMaps {
|
|
86
|
-
/**
|
|
87
|
-
* Save a map in the registered maps. If the map already exists, it will be overwritten.
|
|
88
|
-
* @param map The map to save.
|
|
89
|
-
* @returns
|
|
90
|
-
*/
|
|
91
|
-
function add(map: MapInterface | MapInterface[]): void;
|
|
92
|
-
/**
|
|
93
|
-
* Get a map by its id.
|
|
94
|
-
* @param id The id of the map.
|
|
95
|
-
* @returns The map or undefined if not found.
|
|
96
|
-
*/
|
|
97
|
-
function get(id: string): MapInterface | undefined;
|
|
98
|
-
/**
|
|
99
|
-
* Get a list of all maps registered.
|
|
100
|
-
* @returns An array of maps.
|
|
101
|
-
*/
|
|
102
|
-
function values(): MapInterface[];
|
|
103
|
-
/**
|
|
104
|
-
* Check if a map is registered.
|
|
105
|
-
* @param id The id of the map.
|
|
106
|
-
* @returns True if the map is registered, false otherwise.
|
|
107
|
-
*/
|
|
108
|
-
function has(id: string): boolean;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
declare namespace RegisteredQuest {
|
|
112
|
-
/**
|
|
113
|
-
* Save a quest in the registered quests. If the quest already exists, it will be overwritten.
|
|
114
|
-
* @param quest The quest to save.
|
|
115
|
-
* @returns
|
|
116
|
-
*/
|
|
117
|
-
function add(quests: QuestInterface | QuestInterface[]): void;
|
|
118
|
-
/**
|
|
119
|
-
* Get a quest by its id.
|
|
120
|
-
* @param id The id of the quest.
|
|
121
|
-
* @returns The quest or undefined if not found.
|
|
122
|
-
*/
|
|
123
|
-
function get(id: string): QuestInterface | undefined;
|
|
124
|
-
/**
|
|
125
|
-
* Get a list of all quests registered.
|
|
126
|
-
* @returns An array of quests.
|
|
127
|
-
*/
|
|
128
|
-
function values(): QuestInterface[];
|
|
129
|
-
/**
|
|
130
|
-
* Check if a quest is registered.
|
|
131
|
-
* @param id The id of the quest.
|
|
132
|
-
* @returns True if the quest is registered, false otherwise.
|
|
133
|
-
*/
|
|
134
|
-
function has(id: string): boolean;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
declare namespace RegisteredRooms {
|
|
138
|
-
/**
|
|
139
|
-
* Save a room in the registered rooms, and their location and map if they are not already registered.
|
|
140
|
-
* If the room already exists, it will be overwritten.
|
|
141
|
-
* @param room The room to save.
|
|
142
|
-
* @returns
|
|
143
|
-
*/
|
|
144
|
-
function add(room: RoomInterface | RoomInterface[]): void;
|
|
145
|
-
/**
|
|
146
|
-
* Get a room by its id.
|
|
147
|
-
* @param id The id of the room.
|
|
148
|
-
* @returns The room or undefined if not found.
|
|
149
|
-
*/
|
|
150
|
-
function get(id: string): RoomInterface | undefined;
|
|
151
|
-
/**
|
|
152
|
-
* Get a list of all rooms registered.
|
|
153
|
-
* @returns An array of rooms.
|
|
154
|
-
*/
|
|
155
|
-
function values(): RoomInterface[];
|
|
156
|
-
/**
|
|
157
|
-
* Check if a room is registered.
|
|
158
|
-
* @param id The id of the room.
|
|
159
|
-
* @returns True if the room is registered, false otherwise.
|
|
160
|
-
*/
|
|
161
|
-
function has(id: string): boolean;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export { RegisteredActivities, RegisteredCommitments, RegisteredLocations, RegisteredMaps, RegisteredQuest as RegisteredQuests, RegisteredRooms };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {CachedMap}from'@drincs/pixi-vn';var o;(t=>(t.log=(e,...r)=>console.log(`[NQTR] ${e}`,...r),t.warn=(e,...r)=>console.warn(`[NQTR] ${e}`,...r),t.error=(e,...r)=>console.error(`[NQTR] ${e}`,...r),t.info=(e,...r)=>console.info(`[NQTR] ${e}`,...r)))(o||={});var c=new CachedMap({cacheSize:20}),y;(t=>{function n(e){if(Array.isArray(e)){e.forEach(r=>t.add(r));return}c.set(e.id,e);}t.add=n;function a(e){try{let r=c.get(e);if(!r){console.warn(`[NQTR] Activity ${e} not found, you should register it first`);return}return r}catch(r){o.error(`Error while getting Activity ${e}`,r);return}}t.get=a;function i(){return Array.from(c.values())}t.values=i;function f(e){return c.has(e)}t.has=f;})(y||={});var M=y;var s=new CachedMap({cacheSize:20});new CachedMap({cacheSize:20});var I;(t=>{function n(e){if(Array.isArray(e)){e.forEach(r=>t.add(r));return}s.set(e.id,e);}t.add=n;function a(e){try{let r=s.get(e);if(!r){console.warn(`[NQTR] Commitment ${e} not found, you should register it first`);return}return r}catch(r){o.error(`Error while getting Commitment ${e}`,r);return}}t.get=a;function i(){return Array.from(s.values())}t.values=i;function f(e){return s.has(e)}t.has=f;})(I||={});var $=I;var u=new CachedMap({cacheSize:20}),A;(t=>{function n(e){if(Array.isArray(e)){e.forEach(r=>n(r));return}u.set(e.id,e);}t.add=n;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){o.error(`Error while getting Location ${e}`,r);return}}t.get=a;function i(){return Array.from(u.values())}t.values=i;function f(e){return u.has(e)}t.has=f;})(A||={});var g=A;var m=new CachedMap({cacheSize:20}),R;(t=>{function n(e){if(Array.isArray(e)){e.forEach(r=>n(r));return}m.set(e.id,e);}t.add=n;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){o.error(`Error while getting Map ${e}`,r);return}}t.get=a;function i(){return Array.from(m.values())}t.values=i;function f(e){return m.has(e)}t.has=f;})(R||={});var l=R;var p=new CachedMap({cacheSize:5}),w;(t=>{function n(e){if(Array.isArray(e)){e.forEach(r=>t.add(r));return}p.set(e.id,e);}t.add=n;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){o.error(`Error while getting Quest ${e}`,r);return}}t.get=a;function i(){return Array.from(p.values())}t.values=i;function f(e){return p.has(e)}t.has=f;})(w||={});var T=w;var d=new CachedMap({cacheSize:20}),v;(t=>{function n(e){if(Array.isArray(e)){e.forEach(Q=>n(Q));return}d.set(e.id,e);let r=e.location;g.add(r);let h=r?.map;h&&l.add(h);}t.add=n;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){o.error(`Error while getting Room ${e}`,r);return}}t.get=a;function i(){return Array.from(d.values())}t.values=i;function f(e){return d.has(e)}t.has=f;})(v||={});var S=v;export{M as RegisteredActivities,$ as RegisteredCommitments,g as RegisteredLocations,l as RegisteredMaps,T as RegisteredQuests,S as RegisteredRooms};//# sourceMappingURL=index.mjs.map
|
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/log-utility.ts","../../src/decorators/RegisteredActivities.ts","../../src/decorators/RegisteredCommitments.ts","../../src/decorators/RegisteredLocations.ts","../../src/decorators/RegisteredMaps.ts","../../src/decorators/RegisteredQuests.ts","../../src/decorators/RegisteredRooms.ts"],"names":["logger","message","optionalParams","registeredActivities","CachedMap","RegisteredActivities","add","activities","activity","get","id","e","values","has","RegisteredActivities_default","registeredCommitments","RegisteredCommitments","commitments","commitment","RegisteredCommitments_default","registeredLocations","RegisteredLocations","location","c","RegisteredLocations_default","registeredMaps","RegisteredMaps","map","RegisteredMaps_default","registeredQuests","RegisteredQuest","quests","quest","RegisteredQuests_default","registeredRooms","RegisteredRooms","room","RegisteredRooms_default"],"mappings":"wCAAO,IAAUA,OACAA,CAAAA,CAAA,GAAA,CAAM,CAACC,CAAAA,CAAAA,GAAkBC,CAAAA,GAA0B,QAAQ,GAAA,CAAI,CAAA,OAAA,EAAUD,CAAO,CAAA,CAAA,CAAI,GAAGC,CAAc,CAAA,CACrGF,CAAAA,CAAA,KAAO,CAACC,CAAAA,CAAAA,GAAkBC,IACnC,OAAA,CAAQ,IAAA,CAAK,UAAUD,CAAO,CAAA,CAAA,CAAI,GAAGC,CAAc,CAAA,CAC1CF,EAAA,KAAA,CAAQ,CAACC,KAAkBC,CAAAA,GACpC,OAAA,CAAQ,MAAM,CAAA,O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CAAG,EAE9B,CAZOQ,CAAAA,CAAS,GAAA,CAAA7B,EAmBT,SAASG,CAAAA,CAAIC,EAAuC,CACvD,GAAI,CACA,IAAI0B,CAAAA,CAAOF,EAAgB,GAAA,CAAIxB,CAAE,EACjC,GAAI,CAAC0B,EAAM,CACP,OAAA,CAAQ,KAAK,CAAA,YAAA,EAAe1B,CAAE,CAAA,wCAAA,CAA0C,CAAA,CACxE,MACJ,CACA,OAAO0B,CACX,CAAA,MAASzB,EAAG,CACRX,CAAAA,CAAO,MAAM,CAAA,yBAAA,EAA4BU,CAAE,GAAIC,CAAC,CAAA,CAChD,MACJ,CACJ,CAZOwB,EAAS,GAAA,CAAA1B,CAAAA,CAkBT,SAASG,CAAAA,EAA0B,CACtC,OAAO,KAAA,CAAM,IAAA,CAAKsB,CAAAA,CAAgB,QAAQ,CAC9C,CAFOC,CAAAA,CAAS,MAAA,CAAAvB,EAST,SAASC,CAAAA,CAAIH,EAAqB,CACrC,OAAOwB,EAAgB,GAAA,CAAIxB,CAAE,CACjC,CAFOyB,CAAAA,CAAS,IAAAtB,EAAAA,CAAAA,EArDVsB,CAAAA,GAAA,EAAA,CAAA,CAyDV,IAAOE,CAAAA,CAAQF","file":"index.mjs","sourcesContent":["export namespace logger {\n export const log = (message?: any, ...optionalParams: any[]) => console.log(`[NQTR] ${message}`, ...optionalParams);\n export const warn = (message?: any, ...optionalParams: any[]) =>\n console.warn(`[NQTR] ${message}`, ...optionalParams);\n export const error = (message?: any, ...optionalParams: any[]) =>\n console.error(`[NQTR] ${message}`, ...optionalParams);\n export const info = (message?: any, ...optionalParams: any[]) =>\n console.info(`[NQTR] ${message}`, ...optionalParams);\n}\n","import { CachedMap } from \"@drincs/pixi-vn\";\nimport { ActivityInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\n/**\n * A Map that contains all activities registered and available to be used.\n * The key is the id of the activity and the value is the activity itself.\n */\nconst registeredActivities = new CachedMap<string, ActivityInterface>({ cacheSize: 20 });\n\nnamespace RegisteredActivities {\n /**\n * Save an activity in the registered activities. If the activity already exists, it will be overwritten.\n * @param activity The activity to save.\n * @returns\n */\n export function add(activities: ActivityInterface | ActivityInterface[]) {\n if (Array.isArray(activities)) {\n activities.forEach((activity) => RegisteredActivities.add(activity));\n return;\n }\n registeredActivities.set(activities.id, activities);\n }\n\n /**\n * Get an activity by its id.\n * @param id The id of the activity.\n * @returns The activity or undefined if not found.\n */\n export function get(id: string): ActivityInterface | undefined {\n try {\n let activity = registeredActivities.get(id);\n if (!activity) {\n console.warn(`[NQTR] Activity ${id} not found, you should register it first`);\n return;\n }\n return activity;\n } catch (e) {\n logger.error(`Error while getting Activity ${id}`, e);\n return;\n }\n }\n\n /**\n * Get a list of all activities registered.\n * @returns An array of activities.\n */\n export function values(): ActivityInterface[] {\n return Array.from(registeredActivities.values());\n }\n\n /**\n * Check if an activity is registered.\n * @param id The id of the activity.\n * @returns True if the activity is registered, false otherwise.\n */\n export function has(id: string): boolean {\n return registeredActivities.has(id);\n }\n}\nexport default RegisteredActivities;\n","import { CachedMap } from \"@drincs/pixi-vn\";\nimport { CommitmentInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\n/**\n * A Map that contains all commitments registered and available to be used.\n * The key is the id of the commitment and the value is the commitment itself.\n */\nexport const registeredCommitments = new CachedMap<string, CommitmentInterface>({ cacheSize: 20 });\nexport const fixedCommitments = new CachedMap<string, CommitmentInterface>({ cacheSize: 20 });\n\nnamespace RegisteredCommitments {\n /**\n * Save a commitment in the registered commitments. If the commitment already exists, it will be overwritten.\n * @param commitment The commitment to save.\n * @returns\n */\n export function add(commitments: CommitmentInterface | CommitmentInterface[]) {\n if (Array.isArray(commitments)) {\n commitments.forEach((commitment) => RegisteredCommitments.add(commitment));\n return;\n }\n registeredCommitments.set(commitments.id, commitments);\n }\n /**\n * Get a commitment by its id.\n * @param id The id of the commitment.\n * @returns The commitment or undefined if not found.\n */\n export function get(id: string): CommitmentInterface | undefined {\n try {\n let commitment = registeredCommitments.get(id);\n if (!commitment) {\n console.warn(`[NQTR] Commitment ${id} not found, you should register it first`);\n return;\n }\n return commitment;\n } catch (e) {\n logger.error(`Error while getting Commitment ${id}`, e);\n return;\n }\n }\n /**\n * Get a list of all commitments registered.\n * @returns An array of commitments.\n */\n export function values(): CommitmentInterface[] {\n return Array.from(registeredCommitments.values());\n }\n /**\n * Check if a commitment is registered.\n * @param id The id of the commitment.\n * @returns True if the commitment is registered, false otherwise.\n */\n export function has(id: string): boolean {\n return registeredCommitments.has(id);\n }\n}\nexport default RegisteredCommitments;\n","import { CachedMap } from \"@drincs/pixi-vn\";\nimport { LocationInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\n/**\n * A Map that contains all locations registered and available to be used.\n * The key is the id of the location and the value is the location itself.\n */\nconst registeredLocations = new CachedMap<string, LocationInterface>({ cacheSize: 20 });\n\nnamespace RegisteredLocations {\n /**\n * Save a location in the registered locations. If the location already exists, it will be overwritten.\n * @param location The location to save.\n * @returns\n */\n export function add(location: LocationInterface | LocationInterface[]) {\n if (Array.isArray(location)) {\n location.forEach((c) => add(c));\n return;\n }\n // if (registeredLocations.has(location.id)) {\n // console.warn(`[NQTR] Location id ${location.id} already exists, it will be overwritten`);\n // }\n registeredLocations.set(location.id, location);\n }\n\n /**\n * Get a location by its id.\n * @param id The id of the location.\n * @returns The location or undefined if not found.\n */\n export function get(id: string): LocationInterface | undefined {\n try {\n let location = registeredLocations.get(id);\n if (!location) {\n console.warn(`[NQTR] Location ${id} not found, you should register it first`);\n return;\n }\n return location;\n } catch (e) {\n logger.error(`Error while getting Location ${id}`, e);\n return;\n }\n }\n\n /**\n * Get a list of all locations registered.\n * @returns An array of locations.\n */\n export function values(): LocationInterface[] {\n return Array.from(registeredLocations.values());\n }\n\n /**\n * Check if a location is registered.\n * @param id The id of the location.\n * @returns True if the location is registered, false otherwise.\n */\n export function has(id: string): boolean {\n return registeredLocations.has(id);\n }\n}\nexport default RegisteredLocations;\n","import { CachedMap } from \"@drincs/pixi-vn\";\nimport { MapInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\n/**\n * A Map that contains all maps registered and available to be used.\n * The key is the id of the map and the value is the map itself.\n */\nconst registeredMaps = new CachedMap<string, MapInterface>({ cacheSize: 20 });\n\nnamespace RegisteredMaps {\n /**\n * Save a map in the registered maps. If the map already exists, it will be overwritten.\n * @param map The map to save.\n * @returns\n */\n export function add(map: MapInterface | MapInterface[]) {\n if (Array.isArray(map)) {\n map.forEach((c) => add(c));\n return;\n }\n // if (registeredMaps.has(map.id)) {\n // console.warn(`[NQTR] Map id ${map.id} already exists, it will be overwritten`);\n // }\n registeredMaps.set(map.id, map);\n }\n\n /**\n * Get a map by its id.\n * @param id The id of the map.\n * @returns The map or undefined if not found.\n */\n export function get(id: string): MapInterface | undefined {\n try {\n let map = registeredMaps.get(id);\n if (!map) {\n console.warn(`[NQTR] Map ${id} not found, you should register it first`);\n return;\n }\n return map;\n } catch (e) {\n logger.error(`Error while getting Map ${id}`, e);\n return;\n }\n }\n\n /**\n * Get a list of all maps registered.\n * @returns An array of maps.\n */\n export function values(): MapInterface[] {\n return Array.from(registeredMaps.values());\n }\n\n /**\n * Check if a map is registered.\n * @param id The id of the map.\n * @returns True if the map is registered, false otherwise.\n */\n export function has(id: string): boolean {\n return registeredMaps.has(id);\n }\n}\nexport default RegisteredMaps;\n","import { CachedMap } from \"@drincs/pixi-vn\";\nimport { QuestInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\n/**\n * A Map that contains all quests registered and available to be used.\n * The key is the id of the quest and the value is the quest itself.\n */\nconst registeredQuests = new CachedMap<string, QuestInterface>({ cacheSize: 5 });\n\nnamespace RegisteredQuest {\n /**\n * Save a quest in the registered quests. If the quest already exists, it will be overwritten.\n * @param quest The quest to save.\n * @returns\n */\n export function add(quests: QuestInterface | QuestInterface[]) {\n if (Array.isArray(quests)) {\n quests.forEach((quest) => RegisteredQuest.add(quest));\n return;\n }\n registeredQuests.set(quests.id, quests);\n }\n /**\n * Get a quest by its id.\n * @param id The id of the quest.\n * @returns The quest or undefined if not found.\n */\n export function get(id: string): QuestInterface | undefined {\n try {\n let quest = registeredQuests.get(id);\n if (!quest) {\n console.warn(`[NQTR] Quest ${id} not found, you should register it first`);\n return;\n }\n return quest;\n } catch (e) {\n logger.error(`Error while getting Quest ${id}`, e);\n return;\n }\n }\n /**\n * Get a list of all quests registered.\n * @returns An array of quests.\n */\n export function values(): QuestInterface[] {\n return Array.from(registeredQuests.values());\n }\n /**\n * Check if a quest is registered.\n * @param id The id of the quest.\n * @returns True if the quest is registered, false otherwise.\n */\n export function has(id: string): boolean {\n return registeredQuests.has(id);\n }\n}\nexport default RegisteredQuest;\n","import { CachedMap } from \"@drincs/pixi-vn\";\nimport { RoomInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\nimport RegisteredLocations from \"./RegisteredLocations\";\nimport RegisteredMaps from \"./RegisteredMaps\";\n\n/**\n * A Map that contains all rooms registered and available to be used.\n * The key is the id of the room and the value is the room itself.\n */\nconst registeredRooms = new CachedMap<string, RoomInterface>({ cacheSize: 20 });\n\nnamespace RegisteredRooms {\n /**\n * Save a room in the registered rooms, and their location and map if they are not already registered.\n * If the room already exists, it will be overwritten.\n * @param room The room to save.\n * @returns\n */\n export function add(room: RoomInterface | RoomInterface[]) {\n if (Array.isArray(room)) {\n room.forEach((c) => add(c));\n return;\n }\n registeredRooms.set(room.id, room);\n let location = room.location;\n RegisteredLocations.add(location);\n let map = location?.map;\n if (map) {\n RegisteredMaps.add(map);\n }\n }\n\n /**\n * Get a room by its id.\n * @param id The id of the room.\n * @returns The room or undefined if not found.\n */\n export function get(id: string): RoomInterface | undefined {\n try {\n let room = registeredRooms.get(id);\n if (!room) {\n console.warn(`[NQTR] Room ${id} not found, you should register it first`);\n return;\n }\n return room;\n } catch (e) {\n logger.error(`Error while getting Room ${id}`, e);\n return;\n }\n }\n\n /**\n * Get a list of all rooms registered.\n * @returns An array of rooms.\n */\n export function values(): RoomInterface[] {\n return Array.from(registeredRooms.values());\n }\n\n /**\n * Check if a room is registered.\n * @param id The id of the room.\n * @returns True if the room is registered, false otherwise.\n */\n export function has(id: string): boolean {\n return registeredRooms.has(id);\n }\n}\nexport default RegisteredRooms;\n"]}
|
package/dist/index-B8O3zxyP.d.ts
DELETED
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
import { T as TimeSchedulingInterface, D as DateSchedulingInterface, C as CommitmentInterface, A as ActivityInterface } from './RoomInterface-BhP3JgjH.js';
|
|
2
|
-
import { E as ExecutionType, a as OnRunEvent, Q as QuestInterface, d as QuestsRequiredType, S as StageInterface } from './StageInterface-v96_K9Tg.js';
|
|
3
|
-
|
|
4
|
-
interface ActivityProps {
|
|
5
|
-
/**
|
|
6
|
-
* The name
|
|
7
|
-
* @default ""
|
|
8
|
-
*/
|
|
9
|
-
name?: string;
|
|
10
|
-
/**
|
|
11
|
-
* Time slot in which activity/commitment will be active.
|
|
12
|
-
*/
|
|
13
|
-
timeSlot?: TimeSchedulingInterface;
|
|
14
|
-
/**
|
|
15
|
-
* Used to schedule what date it will be added and removed.
|
|
16
|
-
*/
|
|
17
|
-
dateScheduling?: DateSchedulingInterface;
|
|
18
|
-
/**
|
|
19
|
-
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
20
|
-
* @default false
|
|
21
|
-
*/
|
|
22
|
-
disabled?: boolean | string;
|
|
23
|
-
/**
|
|
24
|
-
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
25
|
-
* @default false
|
|
26
|
-
*/
|
|
27
|
-
hidden?: boolean | string;
|
|
28
|
-
/**
|
|
29
|
-
* The icon of the activity.
|
|
30
|
-
* @default undefined
|
|
31
|
-
*/
|
|
32
|
-
renderIcon?: string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
interface CommitmentProps {
|
|
36
|
-
/**
|
|
37
|
-
* The name
|
|
38
|
-
* @default ""
|
|
39
|
-
*/
|
|
40
|
-
name?: string;
|
|
41
|
-
/**
|
|
42
|
-
* Time slot in which activity/commitment will be active.
|
|
43
|
-
*/
|
|
44
|
-
readonly timeSlot?: TimeSchedulingInterface | undefined;
|
|
45
|
-
/**
|
|
46
|
-
* Used to schedule what date it will be added and removed.
|
|
47
|
-
*/
|
|
48
|
-
readonly dateScheduling?: DateSchedulingInterface | undefined;
|
|
49
|
-
/**
|
|
50
|
-
* The image ofthe Commitment.
|
|
51
|
-
*/
|
|
52
|
-
image?: string;
|
|
53
|
-
/**
|
|
54
|
-
* 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.
|
|
55
|
-
* If you set "automatic" remember to remove the commitment when it is no longer needed, because otherwise it repeats itself every time.
|
|
56
|
-
* @default "interaction"
|
|
57
|
-
*/
|
|
58
|
-
executionType?: ExecutionType;
|
|
59
|
-
/**
|
|
60
|
-
* Is a function that is called when the player interacts with the character.
|
|
61
|
-
* @param commitment
|
|
62
|
-
* @returns
|
|
63
|
-
* @default undefined
|
|
64
|
-
*/
|
|
65
|
-
onRun?: OnRunEvent<CommitmentInterface>;
|
|
66
|
-
/**
|
|
67
|
-
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
68
|
-
* If it is disabled this commitment will not be taken into consideration. So the characters will not be in the room, but will be busy with other commitments.
|
|
69
|
-
* @default false
|
|
70
|
-
*/
|
|
71
|
-
disabled?: boolean | string;
|
|
72
|
-
/**
|
|
73
|
-
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
74
|
-
* @default false
|
|
75
|
-
*/
|
|
76
|
-
hidden?: boolean | string;
|
|
77
|
-
/**
|
|
78
|
-
* The icon of the commitment.
|
|
79
|
-
*/
|
|
80
|
-
icon?: string;
|
|
81
|
-
/**
|
|
82
|
-
* The priority. The higher the number, the higher the priority.
|
|
83
|
-
* 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.
|
|
84
|
-
* @default 0
|
|
85
|
-
*/
|
|
86
|
-
priority?: number;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
interface LocationBaseModelProps {
|
|
90
|
-
/**
|
|
91
|
-
* The name
|
|
92
|
-
* @default ""
|
|
93
|
-
*/
|
|
94
|
-
name?: string;
|
|
95
|
-
/**
|
|
96
|
-
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
97
|
-
* @default false
|
|
98
|
-
*/
|
|
99
|
-
disabled?: boolean | string;
|
|
100
|
-
/**
|
|
101
|
-
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
102
|
-
* @default false
|
|
103
|
-
*/
|
|
104
|
-
hidden?: boolean | string;
|
|
105
|
-
/**
|
|
106
|
-
* The icon of the location.
|
|
107
|
-
* @default undefined
|
|
108
|
-
*/
|
|
109
|
-
icon?: string;
|
|
110
|
-
/**
|
|
111
|
-
* The activities that are available in this location.
|
|
112
|
-
* @default []
|
|
113
|
-
*/
|
|
114
|
-
activities?: ActivityInterface[];
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
interface MapBaseModelProps {
|
|
118
|
-
/**
|
|
119
|
-
* The name
|
|
120
|
-
* @default ""
|
|
121
|
-
*/
|
|
122
|
-
name?: string;
|
|
123
|
-
/**
|
|
124
|
-
* The image of the map.
|
|
125
|
-
* @default undefined
|
|
126
|
-
*/
|
|
127
|
-
image?: string;
|
|
128
|
-
/**
|
|
129
|
-
* The activities that are available in this map.
|
|
130
|
-
* @default []
|
|
131
|
-
*/
|
|
132
|
-
activities?: ActivityInterface[];
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
interface RoomBaseModelProps {
|
|
136
|
-
/**
|
|
137
|
-
* The name
|
|
138
|
-
* @default ""
|
|
139
|
-
*/
|
|
140
|
-
name?: string;
|
|
141
|
-
/**
|
|
142
|
-
* The image of the room.
|
|
143
|
-
* @default undefined
|
|
144
|
-
*/
|
|
145
|
-
image?: string;
|
|
146
|
-
/**
|
|
147
|
-
* The activities that are available in this room.
|
|
148
|
-
* @default []
|
|
149
|
-
*/
|
|
150
|
-
activities?: ActivityInterface[];
|
|
151
|
-
/**
|
|
152
|
-
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
153
|
-
* @default false
|
|
154
|
-
*/
|
|
155
|
-
disabled?: boolean | string;
|
|
156
|
-
/**
|
|
157
|
-
* Whether is hidden. You can also pass a Pixi'VN flag name.
|
|
158
|
-
* @default false
|
|
159
|
-
*/
|
|
160
|
-
hidden?: boolean | string;
|
|
161
|
-
/**
|
|
162
|
-
* The icon of the room.
|
|
163
|
-
* @default undefined
|
|
164
|
-
*/
|
|
165
|
-
icon?: string;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
interface QuestProps {
|
|
169
|
-
/**
|
|
170
|
-
* The name of the quest.
|
|
171
|
-
* @default ""
|
|
172
|
-
*/
|
|
173
|
-
name?: string;
|
|
174
|
-
/**
|
|
175
|
-
* The description of the quest.
|
|
176
|
-
* @default ""
|
|
177
|
-
*/
|
|
178
|
-
description?: string;
|
|
179
|
-
/**
|
|
180
|
-
* The icon of the quest.
|
|
181
|
-
* @default undefined
|
|
182
|
-
*/
|
|
183
|
-
icon?: string;
|
|
184
|
-
/**
|
|
185
|
-
* The image of the quest.
|
|
186
|
-
*/
|
|
187
|
-
image?: string;
|
|
188
|
-
/**
|
|
189
|
-
* If the quest is in development.
|
|
190
|
-
* @default false
|
|
191
|
-
*/
|
|
192
|
-
inDevelopment?: boolean;
|
|
193
|
-
/**
|
|
194
|
-
* The function that will be executed when the quest starts.
|
|
195
|
-
*/
|
|
196
|
-
onStart?: OnRunEvent<QuestInterface>;
|
|
197
|
-
/**
|
|
198
|
-
* The function that will be executed when a stage end in the quest.
|
|
199
|
-
*/
|
|
200
|
-
onNextStage?: OnRunEvent<QuestInterface>;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
interface StageFlags {
|
|
204
|
-
/**
|
|
205
|
-
* The flag for checking if the condition is met.
|
|
206
|
-
*/
|
|
207
|
-
flag: string;
|
|
208
|
-
/**
|
|
209
|
-
* The description of the flag.
|
|
210
|
-
*/
|
|
211
|
-
description: string;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
interface StageProps {
|
|
215
|
-
/**
|
|
216
|
-
* The flags of the stage.
|
|
217
|
-
* @default []
|
|
218
|
-
*/
|
|
219
|
-
flags?: StageFlags[];
|
|
220
|
-
/**
|
|
221
|
-
* The name of the stage.
|
|
222
|
-
* @default ""
|
|
223
|
-
*/
|
|
224
|
-
name?: string;
|
|
225
|
-
/**
|
|
226
|
-
* The description of the stage.
|
|
227
|
-
* @default ""
|
|
228
|
-
*/
|
|
229
|
-
description?: string;
|
|
230
|
-
/**
|
|
231
|
-
* The advice description of the stage.
|
|
232
|
-
* @default ""
|
|
233
|
-
*/
|
|
234
|
-
adviceDescription?: string;
|
|
235
|
-
/**
|
|
236
|
-
* The image of the stage.
|
|
237
|
-
*/
|
|
238
|
-
image?: string;
|
|
239
|
-
/**
|
|
240
|
-
* The number of day/date required to start the stage.
|
|
241
|
-
* @example If the value is 3, and the previous stage ends on date 1, the stage will start on date 4.
|
|
242
|
-
*/
|
|
243
|
-
deltaDateRequired?: number;
|
|
244
|
-
/**
|
|
245
|
-
* The flags required to start the stage.
|
|
246
|
-
* @default []
|
|
247
|
-
*/
|
|
248
|
-
flagsRequired?: StageFlags[];
|
|
249
|
-
/**
|
|
250
|
-
* The quests required to start the stage.
|
|
251
|
-
* @default []
|
|
252
|
-
*/
|
|
253
|
-
questsRequired?: QuestsRequiredType[];
|
|
254
|
-
/**
|
|
255
|
-
* The description to request to start the stage.
|
|
256
|
-
* @default ""
|
|
257
|
-
*/
|
|
258
|
-
requestDescriptionToStart?: string;
|
|
259
|
-
/**
|
|
260
|
-
* The function that will be executed when the stage starts.
|
|
261
|
-
*/
|
|
262
|
-
onStart?: OnRunEvent<StageInterface>;
|
|
263
|
-
/**
|
|
264
|
-
* The function that will be executed when the stage ends.
|
|
265
|
-
*/
|
|
266
|
-
onEnd?: OnRunEvent<StageInterface>;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
export type { ActivityProps as A, CommitmentProps as C, LocationBaseModelProps as L, MapBaseModelProps as M, QuestProps as Q, RoomBaseModelProps as R, StageProps as S, StageFlags as a };
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import { C as CommitmentInterface, R as RoomInterface, L as LocationInterface, M as MapInterface } from './RoomInterface-V1-hwph_.mjs';
|
|
2
|
-
import { OnRunProps } from '@drincs/nqtr';
|
|
3
|
-
import { Q as QuestInterface } from './StageInterface-v96_K9Tg.mjs';
|
|
4
|
-
import { CharacterInterface } from '@drincs/pixi-vn';
|
|
5
|
-
import { TimeSettings, ITimeStlot as TimeSlotInterface } from './types/index.mjs';
|
|
6
|
-
|
|
7
|
-
declare class TimeManager {
|
|
8
|
-
initialize(settings: TimeSettings): void;
|
|
9
|
-
get dayStartTime(): number;
|
|
10
|
-
get dayEndTime(): number;
|
|
11
|
-
get defaultTimeSpent(): number;
|
|
12
|
-
get timeSlots(): TimeSlotInterface[];
|
|
13
|
-
get weekLength(): number;
|
|
14
|
-
get weekendStartDay(): number;
|
|
15
|
-
/**
|
|
16
|
-
* Week days name
|
|
17
|
-
* @param weekDayNumber The current week day number (from: 0 - to: {@link weekLength} - 1).
|
|
18
|
-
* @returns The name of the week day.
|
|
19
|
-
* @example
|
|
20
|
-
* ```ts
|
|
21
|
-
* (weekDayNumber: number) => {
|
|
22
|
-
* const weekDaysNames = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
|
|
23
|
-
* return weekDaysNames[weekDayNumber];
|
|
24
|
-
* }
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
get getDayName(): ((weekDayNumber: number) => string) | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* Get the current time. Time is a numeric variable used to determine and manage time during a day/date.
|
|
30
|
-
* It's recommended to use currentTime as if it were the current time. If you also want to manage minutes, you can use a float value.
|
|
31
|
-
*/
|
|
32
|
-
get currentTime(): number;
|
|
33
|
-
set currentTime(value: number | undefined);
|
|
34
|
-
/**
|
|
35
|
-
* Get the current date. Date is a numeric variable used to determine and manage the number of days passed.
|
|
36
|
-
* It's recommended to use currentDate as if it were the current day.
|
|
37
|
-
*/
|
|
38
|
-
get currentDate(): number;
|
|
39
|
-
set currentDate(value: number | undefined);
|
|
40
|
-
/**
|
|
41
|
-
* If the current day is greater than or equal to the weekend start day, then it will return true.
|
|
42
|
-
*/
|
|
43
|
-
get isWeekend(): boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Get the current week day number (from: 1 - to: {@link weekLength}).
|
|
46
|
-
* For example, if the week length is 7 and the current day is 10, then the result will be 4.
|
|
47
|
-
*/
|
|
48
|
-
get currentWeekDayNumber(): number;
|
|
49
|
-
/**
|
|
50
|
-
* Get the current week day name. If the week days names are not defined, then it will return undefined.
|
|
51
|
-
* 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'.
|
|
52
|
-
* @default ""
|
|
53
|
-
*/
|
|
54
|
-
get currentDayName(): string;
|
|
55
|
-
/**
|
|
56
|
-
* Get the current {@link timeSlots} index.
|
|
57
|
-
* You can use this property to create "Image that changes based on the time period":
|
|
58
|
-
* @example
|
|
59
|
-
* ```tsx
|
|
60
|
-
* import { weekLength } from '@drincs/nqtr';
|
|
61
|
-
*
|
|
62
|
-
* function changeBackground() {
|
|
63
|
-
* return (
|
|
64
|
-
* <img src={`background-currentTimeSlot.currentTimeSlot.png`} />
|
|
65
|
-
* )
|
|
66
|
-
* }
|
|
67
|
-
*/
|
|
68
|
-
get currentTimeSlot(): number;
|
|
69
|
-
/**
|
|
70
|
-
* This function will increase the current time by the given time spent.
|
|
71
|
-
* If the new time is greater than or equal to the max day times, then it will increase the day and set the new time.
|
|
72
|
-
* @param delta is the time spent in times (default: {@link defaultTimeSpent})
|
|
73
|
-
* @returns currentTimeSlot.currentTime
|
|
74
|
-
*/
|
|
75
|
-
increaseTime(delta?: number): number;
|
|
76
|
-
/**
|
|
77
|
-
* This function will increase the current date by the given delta.
|
|
78
|
-
* @param delta is the number of days to increase (default: 1)
|
|
79
|
-
* @param time is the time of the new day (default: {@link dayStartTime})
|
|
80
|
-
* @returns timeTracker.currentDate
|
|
81
|
-
*/
|
|
82
|
-
increaseDate(delta?: number, time?: number): number;
|
|
83
|
-
/**
|
|
84
|
-
* This function will check if the current time is between the given times.
|
|
85
|
-
* @param fromTime the starting time. If the {@link currentTime} is equal to this time, the function will return true.
|
|
86
|
-
* @param toTime the ending time.
|
|
87
|
-
* @returns true if the current time is between the given times, otherwise false.
|
|
88
|
-
*/
|
|
89
|
-
nowIsBetween(fromTime: number | undefined, toTime: number | undefined): boolean;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
declare class RoutineManager {
|
|
93
|
-
get fixedRoutine(): CommitmentInterface[];
|
|
94
|
-
/**
|
|
95
|
-
* Set a commitment as fixed, it will be always available. They cannot be deleted or edit during the game session.
|
|
96
|
-
*/
|
|
97
|
-
set fixedRoutine(commitments: CommitmentInterface[]);
|
|
98
|
-
/**
|
|
99
|
-
* Get the temporary commitments by its id.
|
|
100
|
-
* @returns The temporary commitments.
|
|
101
|
-
*/
|
|
102
|
-
get temporaryRoutine(): CommitmentInterface[];
|
|
103
|
-
get allRoutine(): CommitmentInterface[];
|
|
104
|
-
/**
|
|
105
|
-
* This feature adds the commitments during the game session.
|
|
106
|
-
* @param commitment The commitment or commitments to add.
|
|
107
|
-
*/
|
|
108
|
-
add(commitment: CommitmentInterface[] | CommitmentInterface): void;
|
|
109
|
-
/**
|
|
110
|
-
* Get the commitments added during the game session.
|
|
111
|
-
* @param id The id of the commitment.
|
|
112
|
-
* @returns The commitment or undefined if not found.
|
|
113
|
-
*/
|
|
114
|
-
find(id: string): CommitmentInterface | undefined;
|
|
115
|
-
/**
|
|
116
|
-
* Remove the commitments added during the game session.
|
|
117
|
-
* @param commitment The commitment or commitments to remove.
|
|
118
|
-
*/
|
|
119
|
-
remove(commitment: CommitmentInterface[] | CommitmentInterface): void;
|
|
120
|
-
/**
|
|
121
|
-
* Clear all the expired commitments.
|
|
122
|
-
*/
|
|
123
|
-
clearExpiredRoutine(): void;
|
|
124
|
-
/**
|
|
125
|
-
* Get the current commitments. The hidden commitments are not included.
|
|
126
|
-
* In case there is a character who has two or more commitments at the same time, will be selected the commitment with the highest priority.
|
|
127
|
-
* Higher priority commitments are calculated using the following steps:
|
|
128
|
-
* 1. The commitments that have Commitments BaseModel.priority set to a higher value will be selected first.
|
|
129
|
-
* 2. If there are commitments with the same priority, the commitments that are not fixed will be selected first.
|
|
130
|
-
* 3. If there are commitments with the same priority and the same fixed status, priority will be given to the commitment with a lower index.
|
|
131
|
-
* @returns The current commitments.
|
|
132
|
-
*/
|
|
133
|
-
get currentRoutine(): CommitmentInterface[];
|
|
134
|
-
/**
|
|
135
|
-
* Get the character commitment.
|
|
136
|
-
* @param character The character.
|
|
137
|
-
* @returns The commitment or undefined if not found.
|
|
138
|
-
*/
|
|
139
|
-
getCommitmentByCharacter(character: CharacterInterface): CommitmentInterface | undefined;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
declare class QuestManager {
|
|
143
|
-
/**
|
|
144
|
-
* The quests registered in the game.
|
|
145
|
-
*/
|
|
146
|
-
get quests(): QuestInterface[];
|
|
147
|
-
/**
|
|
148
|
-
* The quests that are started, so they are in progress or completed or failed.
|
|
149
|
-
*/
|
|
150
|
-
get startedQuests(): QuestInterface[];
|
|
151
|
-
/**
|
|
152
|
-
* The quests that are in progress.
|
|
153
|
-
*/
|
|
154
|
-
get inProgressQuests(): QuestInterface[];
|
|
155
|
-
/**
|
|
156
|
-
* The quests that are completed.
|
|
157
|
-
*/
|
|
158
|
-
get completedQuests(): QuestInterface[];
|
|
159
|
-
/**
|
|
160
|
-
* The quests that are failed.
|
|
161
|
-
*/
|
|
162
|
-
get failedQuests(): QuestInterface[];
|
|
163
|
-
/**
|
|
164
|
-
* The quests that are not started.
|
|
165
|
-
*/
|
|
166
|
-
get notStartedQuests(): QuestInterface[];
|
|
167
|
-
/**
|
|
168
|
-
* Get the quest by the id.
|
|
169
|
-
* @param id The id of the quest.
|
|
170
|
-
* @returns The quest with the id.
|
|
171
|
-
*/
|
|
172
|
-
find(id: string): QuestInterface | undefined;
|
|
173
|
-
/**
|
|
174
|
-
* Start the quests that must start on the current stage.
|
|
175
|
-
*/
|
|
176
|
-
startsStageMustBeStarted(props: OnRunProps): Promise<void>;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
declare class NavigatorManager {
|
|
180
|
-
get rooms(): RoomInterface[];
|
|
181
|
-
get locations(): LocationInterface[];
|
|
182
|
-
get maps(): MapInterface[];
|
|
183
|
-
get currentRoomId(): string | undefined;
|
|
184
|
-
get currentRoom(): RoomInterface | undefined;
|
|
185
|
-
set currentRoom(room: RoomInterface | string);
|
|
186
|
-
get currentLocation(): LocationInterface | undefined;
|
|
187
|
-
get currentMap(): MapInterface | undefined;
|
|
188
|
-
/**
|
|
189
|
-
* Clear all the expired activities.
|
|
190
|
-
*/
|
|
191
|
-
clearExpiredActivities(): void;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
declare const timeTracker: TimeManager;
|
|
195
|
-
declare const navigator: NavigatorManager;
|
|
196
|
-
declare const routine: RoutineManager;
|
|
197
|
-
declare const questsNotebook: QuestManager;
|
|
198
|
-
|
|
199
|
-
export { NavigatorManager as N, QuestManager as Q, RoutineManager as R, TimeManager as T, navigator as n, questsNotebook as q, routine as r, timeTracker as t };
|