@drincs/nqtr 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/dist/classes/Activity.d.mts +199 -0
  2. package/dist/classes/Activity.d.ts +199 -0
  3. package/dist/classes/Activity.js +508 -0
  4. package/dist/classes/Activity.js.map +1 -0
  5. package/dist/classes/Activity.mjs +503 -0
  6. package/dist/classes/Activity.mjs.map +1 -0
  7. package/dist/classes/Commitment.d.mts +6 -0
  8. package/dist/classes/Commitment.d.ts +6 -0
  9. package/dist/classes/Commitment.js +402 -0
  10. package/dist/classes/Commitment.js.map +1 -0
  11. package/dist/classes/Commitment.mjs +400 -0
  12. package/dist/classes/Commitment.mjs.map +1 -0
  13. package/dist/classes/index.d.mts +6 -0
  14. package/dist/classes/index.d.ts +6 -0
  15. package/dist/classes/index.js +520 -0
  16. package/dist/classes/index.js.map +1 -0
  17. package/dist/classes/index.mjs +517 -0
  18. package/dist/classes/index.mjs.map +1 -0
  19. package/dist/classes/navigation/ActivityRoom.d.mts +6 -0
  20. package/dist/classes/navigation/ActivityRoom.d.ts +6 -0
  21. package/dist/classes/navigation/ActivityRoom.js +435 -0
  22. package/dist/classes/navigation/ActivityRoom.js.map +1 -0
  23. package/dist/classes/navigation/ActivityRoom.mjs +433 -0
  24. package/dist/classes/navigation/ActivityRoom.mjs.map +1 -0
  25. package/dist/classes/navigation/Location.d.mts +6 -0
  26. package/dist/classes/navigation/Location.d.ts +6 -0
  27. package/dist/classes/navigation/Location.js +110 -0
  28. package/dist/classes/navigation/Location.js.map +1 -0
  29. package/dist/classes/navigation/Location.mjs +108 -0
  30. package/dist/classes/navigation/Location.mjs.map +1 -0
  31. package/dist/classes/navigation/Map.d.mts +6 -0
  32. package/dist/classes/navigation/Map.d.ts +6 -0
  33. package/dist/classes/navigation/Map.js +109 -0
  34. package/dist/classes/navigation/Map.js.map +1 -0
  35. package/dist/classes/navigation/Map.mjs +107 -0
  36. package/dist/classes/navigation/Map.mjs.map +1 -0
  37. package/dist/classes/navigation/Room.d.mts +6 -0
  38. package/dist/classes/navigation/Room.d.ts +6 -0
  39. package/dist/classes/navigation/Room.js +750 -0
  40. package/dist/classes/navigation/Room.js.map +1 -0
  41. package/dist/classes/navigation/Room.mjs +745 -0
  42. package/dist/classes/navigation/Room.mjs.map +1 -0
  43. package/dist/classes/navigation/index.d.mts +6 -0
  44. package/dist/classes/navigation/index.d.ts +6 -0
  45. package/dist/classes/navigation/index.js +945 -0
  46. package/dist/classes/navigation/index.js.map +1 -0
  47. package/dist/classes/navigation/index.mjs +941 -0
  48. package/dist/classes/navigation/index.mjs.map +1 -0
  49. package/dist/classes/quest/Goal.d.mts +23 -0
  50. package/dist/classes/quest/Goal.d.ts +23 -0
  51. package/dist/classes/quest/Goal.js +33 -0
  52. package/dist/classes/quest/Goal.js.map +1 -0
  53. package/dist/classes/quest/Goal.mjs +31 -0
  54. package/dist/classes/quest/Goal.mjs.map +1 -0
  55. package/dist/classes/quest/Quest.d.mts +3 -0
  56. package/dist/classes/quest/Quest.d.ts +3 -0
  57. package/dist/classes/quest/Quest.js +39 -0
  58. package/dist/classes/quest/Quest.js.map +1 -0
  59. package/dist/classes/quest/Quest.mjs +37 -0
  60. package/dist/classes/quest/Quest.mjs.map +1 -0
  61. package/dist/classes/quest/Stage.d.mts +3 -0
  62. package/dist/classes/quest/Stage.d.ts +3 -0
  63. package/dist/classes/quest/Stage.js +105 -0
  64. package/dist/classes/quest/Stage.js.map +1 -0
  65. package/dist/classes/quest/Stage.mjs +103 -0
  66. package/dist/classes/quest/Stage.mjs.map +1 -0
  67. package/dist/classes/quest/index.d.mts +3 -0
  68. package/dist/classes/quest/index.d.ts +3 -0
  69. package/dist/classes/quest/index.js +133 -0
  70. package/dist/classes/quest/index.js.map +1 -0
  71. package/dist/classes/quest/index.mjs +129 -0
  72. package/dist/classes/quest/index.mjs.map +1 -0
  73. package/dist/decorators/ActivityDecorator.d.mts +12 -0
  74. package/dist/decorators/ActivityDecorator.d.ts +12 -0
  75. package/dist/decorators/ActivityDecorator.js +33 -0
  76. package/dist/decorators/ActivityDecorator.js.map +1 -0
  77. package/dist/decorators/ActivityDecorator.mjs +29 -0
  78. package/dist/decorators/ActivityDecorator.mjs.map +1 -0
  79. package/dist/decorators/CommitmentDecorator.d.mts +21 -0
  80. package/dist/decorators/CommitmentDecorator.d.ts +21 -0
  81. package/dist/decorators/CommitmentDecorator.js +77 -0
  82. package/dist/decorators/CommitmentDecorator.js.map +1 -0
  83. package/dist/decorators/CommitmentDecorator.mjs +68 -0
  84. package/dist/decorators/CommitmentDecorator.mjs.map +1 -0
  85. package/dist/decorators/RoomDecorator.d.mts +46 -0
  86. package/dist/decorators/RoomDecorator.d.ts +46 -0
  87. package/dist/decorators/RoomDecorator.js +57 -0
  88. package/dist/decorators/RoomDecorator.js.map +1 -0
  89. package/dist/decorators/RoomDecorator.mjs +49 -0
  90. package/dist/decorators/RoomDecorator.mjs.map +1 -0
  91. package/dist/decorators/index.d.mts +9 -0
  92. package/dist/decorators/index.d.ts +9 -0
  93. package/dist/decorators/index.js +145 -0
  94. package/dist/decorators/index.js.map +1 -0
  95. package/dist/decorators/index.mjs +132 -0
  96. package/dist/decorators/index.mjs.map +1 -0
  97. package/dist/enums/ExecutionTypeEnum.d.mts +6 -0
  98. package/dist/enums/ExecutionTypeEnum.d.ts +6 -0
  99. package/dist/enums/ExecutionTypeEnum.js +12 -0
  100. package/dist/enums/ExecutionTypeEnum.js.map +1 -0
  101. package/dist/enums/ExecutionTypeEnum.mjs +10 -0
  102. package/dist/enums/ExecutionTypeEnum.mjs.map +1 -0
  103. package/dist/enums/index.d.mts +1 -0
  104. package/dist/enums/index.d.ts +1 -0
  105. package/dist/enums/index.js +12 -0
  106. package/dist/enums/index.js.map +1 -0
  107. package/dist/enums/index.mjs +10 -0
  108. package/dist/enums/index.mjs.map +1 -0
  109. package/dist/functions/ActivityFunctions.d.mts +11 -0
  110. package/dist/functions/ActivityFunctions.d.ts +11 -0
  111. package/dist/functions/ActivityFunctions.js +54 -0
  112. package/dist/functions/ActivityFunctions.js.map +1 -0
  113. package/dist/functions/ActivityFunctions.mjs +51 -0
  114. package/dist/functions/ActivityFunctions.mjs.map +1 -0
  115. package/dist/functions/NavigationFunctions.d.mts +13 -0
  116. package/dist/functions/NavigationFunctions.d.ts +13 -0
  117. package/dist/functions/NavigationFunctions.js +173 -0
  118. package/dist/functions/NavigationFunctions.js.map +1 -0
  119. package/dist/functions/NavigationFunctions.mjs +168 -0
  120. package/dist/functions/NavigationFunctions.mjs.map +1 -0
  121. package/dist/functions/RoutineFunctions.d.mts +12 -0
  122. package/dist/functions/RoutineFunctions.d.ts +12 -0
  123. package/dist/functions/RoutineFunctions.js +87 -0
  124. package/dist/functions/RoutineFunctions.js.map +1 -0
  125. package/dist/functions/RoutineFunctions.mjs +83 -0
  126. package/dist/functions/RoutineFunctions.mjs.map +1 -0
  127. package/dist/functions/index.d.mts +9 -0
  128. package/dist/functions/index.d.ts +9 -0
  129. package/dist/functions/index.js +264 -0
  130. package/dist/functions/index.js.map +1 -0
  131. package/dist/functions/index.mjs +254 -0
  132. package/dist/functions/index.mjs.map +1 -0
  133. package/dist/index-BjOzVDyw.d.ts +76 -0
  134. package/dist/index-BvCfRbJB.d.mts +564 -0
  135. package/dist/index-Ci6Aw7YE.d.ts +564 -0
  136. package/dist/index-gJ26gdgL.d.mts +76 -0
  137. package/dist/index.d.mts +16 -925
  138. package/dist/index.d.ts +16 -925
  139. package/dist/index.js +169 -156
  140. package/dist/index.js.map +1 -1
  141. package/dist/index.mjs +117 -82
  142. package/dist/index.mjs.map +1 -1
  143. package/dist/managers/TimeManager.d.mts +84 -0
  144. package/dist/managers/TimeManager.d.ts +84 -0
  145. package/dist/managers/TimeManager.js +251 -0
  146. package/dist/managers/TimeManager.js.map +1 -0
  147. package/dist/managers/TimeManager.mjs +249 -0
  148. package/dist/managers/TimeManager.mjs.map +1 -0
  149. package/dist/managers/index.d.mts +2 -0
  150. package/dist/managers/index.d.ts +2 -0
  151. package/dist/managers/index.js +251 -0
  152. package/dist/managers/index.js.map +1 -0
  153. package/dist/managers/index.mjs +249 -0
  154. package/dist/managers/index.mjs.map +1 -0
  155. package/dist/override/OnRunActivityProps.d.mts +19 -0
  156. package/dist/override/OnRunActivityProps.d.ts +19 -0
  157. package/dist/override/OnRunActivityProps.js +4 -0
  158. package/dist/override/OnRunActivityProps.js.map +1 -0
  159. package/dist/override/OnRunActivityProps.mjs +3 -0
  160. package/dist/override/OnRunActivityProps.mjs.map +1 -0
  161. package/dist/override/index.d.mts +1 -0
  162. package/dist/override/index.d.ts +1 -0
  163. package/dist/override/index.js +4 -0
  164. package/dist/override/index.js.map +1 -0
  165. package/dist/override/index.mjs +3 -0
  166. package/dist/override/index.mjs.map +1 -0
  167. package/dist/types/GraphicItem.d.mts +5 -0
  168. package/dist/types/GraphicItem.d.ts +5 -0
  169. package/dist/types/GraphicItem.js +4 -0
  170. package/dist/types/GraphicItem.js.map +1 -0
  171. package/dist/types/GraphicItem.mjs +3 -0
  172. package/dist/types/GraphicItem.mjs.map +1 -0
  173. package/dist/types/QuestsRequired.d.mts +3 -0
  174. package/dist/types/QuestsRequired.d.ts +3 -0
  175. package/dist/types/QuestsRequired.js +4 -0
  176. package/dist/types/QuestsRequired.js.map +1 -0
  177. package/dist/types/QuestsRequired.mjs +3 -0
  178. package/dist/types/QuestsRequired.mjs.map +1 -0
  179. package/dist/types/TimeSettings.d.mts +58 -0
  180. package/dist/types/TimeSettings.d.ts +58 -0
  181. package/dist/types/TimeSettings.js +4 -0
  182. package/dist/types/TimeSettings.js.map +1 -0
  183. package/dist/types/TimeSettings.mjs +3 -0
  184. package/dist/types/TimeSettings.mjs.map +1 -0
  185. package/dist/types/index.d.mts +4 -0
  186. package/dist/types/index.d.ts +4 -0
  187. package/dist/types/index.js +4 -0
  188. package/dist/types/index.js.map +1 -0
  189. package/dist/types/index.mjs +3 -0
  190. package/dist/types/index.mjs.map +1 -0
  191. package/package.json +1 -1
@@ -0,0 +1,564 @@
1
+ import ActivityModel, { ActivityStoredAbstract, OnRunActivityEvent, ActivityProps } from './classes/Activity.mjs';
2
+ import { StoredClassModel, CharacterBaseModel } from '@drincs/pixi-vn';
3
+ import { ExecutionTypeEnum } from './enums/ExecutionTypeEnum.mjs';
4
+ import { GraphicItemType } from './types/GraphicItem.mjs';
5
+
6
+ interface MapBaseModelProps<TMap extends MapBaseModel = MapBaseModel> {
7
+ /**
8
+ * The name
9
+ * @default ""
10
+ */
11
+ name?: string;
12
+ /**
13
+ * The image. It can be a string, an Element or a Pixi'VN Canvas Item.
14
+ * Or an object to manage multiple image types. For example to have a image based on time.
15
+ * @example
16
+ * ```ts
17
+ * {
18
+ * "morning": "morning-background.jpg",
19
+ * "afternoon": "afternoon-background.jpg",
20
+ * "evening": "evening-background.jpg",
21
+ * "night": "night-background.jpg"
22
+ * }
23
+ * ```
24
+ * @default undefined
25
+ */
26
+ image?: GraphicItemType | Record<any, GraphicItemType> | object;
27
+ /**
28
+ * The neighboring maps that are available in this map.
29
+ * @example
30
+ * ```ts
31
+ * {
32
+ * "north": "atlanta_map_id",
33
+ * "south": "miami_map_id",
34
+ * "east": "new_york_map_id",
35
+ * "west": "los_angeles_map_id"
36
+ * }
37
+ * ```
38
+ * @default {}
39
+ */
40
+ neighboringMaps?: {
41
+ [key: string]: string;
42
+ };
43
+ /**
44
+ * Whether is disabled. You can also pass a Pixi'VN flag name.
45
+ * @default false
46
+ */
47
+ disabled?: boolean | string;
48
+ /**
49
+ * Whether is hidden. You can also pass a Pixi'VN flag name.
50
+ * @default false
51
+ */
52
+ hidden?: boolean | string;
53
+ }
54
+ /**
55
+ * The base model of a map. I suggest you extend this class to create your own map model.
56
+ * @example
57
+ * ```typescript
58
+ * export const mainMap = new MapBaseModel('main_map', {
59
+ * name: 'Main Map',
60
+ * image: "https://image.jpg",
61
+ * neighboringMaps: {
62
+ * "north": "atlanta_map_id",
63
+ * "south": "miami_map_id",
64
+ * "east": "new_york_map_id",
65
+ * "west": "los_angeles_map_id"
66
+ * }
67
+ * });
68
+ * ```
69
+ */
70
+ declare class MapBaseModel extends StoredClassModel {
71
+ /**
72
+ * @param id The id of the map, it must be unique.
73
+ * @param props The properties of the map.
74
+ */
75
+ constructor(id: string, props?: MapBaseModelProps);
76
+ private defaultName;
77
+ /**
78
+ * The name of the map.
79
+ * If you set undefined, it will return the initial value of name.
80
+ */
81
+ get name(): string;
82
+ set name(value: string | undefined);
83
+ private defaultImage?;
84
+ /**
85
+ * The image of the map. It can be a string, an Element or a Pixi'VN Canvas Item.
86
+ * If you set undefined, it will return the initial value of image.
87
+ */
88
+ get image(): GraphicItemType | Record<any, GraphicItemType> | object | undefined;
89
+ set image(value: GraphicItemType | Record<any, GraphicItemType> | object | undefined);
90
+ private defaultDisabled;
91
+ /**
92
+ * Whether is disabled. If it is a string, it is a Pixi'VN flag name.
93
+ */
94
+ get disabled(): boolean;
95
+ set disabled(value: boolean | string);
96
+ private defaultHidden;
97
+ /**
98
+ * Whether is hidden. If it is a string, it is a Pixi'VN flag name.
99
+ */
100
+ get hidden(): boolean;
101
+ set hidden(value: boolean | string);
102
+ private _neighboringMaps?;
103
+ /**
104
+ * The neighboring maps that are available in this map.
105
+ * @example
106
+ * ```ts
107
+ * {
108
+ * "north": "atlanta_map_id",
109
+ * "south": "miami_map_id",
110
+ * "east": "new_york_map_id",
111
+ * "west": "los_angeles_map_id"
112
+ * }
113
+ * ```
114
+ */
115
+ get neighboringMaps(): {
116
+ [key: string]: string;
117
+ };
118
+ set neighboringMaps(value: {
119
+ [key: string]: string;
120
+ } | undefined);
121
+ /**
122
+ * Get all locations in the map.
123
+ * @returns The locations in the map.
124
+ */
125
+ getLocations<TLocation extends LocationBaseModel = LocationBaseModel>(): TLocation[];
126
+ }
127
+
128
+ /**
129
+ * The activity generated by the room.
130
+ */
131
+ declare class ActivityRoom<TRoom extends RoomBaseModel = RoomBaseModel> extends ActivityStoredAbstract {
132
+ constructor(id: string, room: TRoom, onRun: OnRunActivityEvent<ActivityStoredAbstract>, props: ActivityProps);
133
+ setStorageProperty<T>(_: string, __: T | undefined): void;
134
+ getStorageProperty<T>(propertyName: string): T | undefined;
135
+ private _id;
136
+ get id(): string;
137
+ /**
138
+ * The room where the activity is.
139
+ */
140
+ private _room;
141
+ get room(): TRoom;
142
+ export(): object;
143
+ }
144
+
145
+ declare const ROOM_CATEGORY = "__nqtr-room__";
146
+ interface RoomBaseModelProps {
147
+ /**
148
+ * The name
149
+ * @default ""
150
+ */
151
+ name?: string;
152
+ /**
153
+ * The image. It can be a string, an Element or a Pixi'VN Canvas Item.
154
+ * Or an object to manage multiple image types. For example to have a image based on time.
155
+ * @example
156
+ * ```ts
157
+ * {
158
+ * "morning": "morning-background.jpg",
159
+ * "afternoon": "afternoon-background.jpg",
160
+ * "evening": "evening-background.jpg",
161
+ * "night": "night-background.jpg"
162
+ * }
163
+ * ```
164
+ * @default undefined
165
+ */
166
+ image?: GraphicItemType | Record<any, GraphicItemType> | object;
167
+ /**
168
+ * The activities that are available in this room.
169
+ * @default []
170
+ */
171
+ defaultActivities?: ActivityModel[];
172
+ /**
173
+ * Whether is disabled. You can also pass a Pixi'VN flag name.
174
+ * @default false
175
+ */
176
+ disabled?: boolean | string;
177
+ /**
178
+ * Whether is hidden. You can also pass a Pixi'VN flag name.
179
+ * @default false
180
+ */
181
+ hidden?: boolean | string;
182
+ /**
183
+ * The icon element. Can be a string or an Element or a Pixi'VN CanvasItem
184
+ * @default undefined
185
+ */
186
+ icon?: GraphicItemType;
187
+ /**
188
+ * Whether is an entrance room, so when the player enters in the location, it will be the first room to be shown.
189
+ * @default false
190
+ */
191
+ isEntrance?: boolean;
192
+ }
193
+ /**
194
+ * The base model of a room. I suggest you extend this class to create your own room model.
195
+ * You must use the saveRoom function to save the room in the registered rooms.
196
+ * @example
197
+ * ```ts
198
+ * export const mcRoom = new RoomBaseModel('mc_room', mcHome, {
199
+ * name: "MC Room",
200
+ * icon: "https://icon.jpg",
201
+ * image: "https://image.jpg",
202
+ * isEntrance: false,
203
+ * })
204
+ * saveRoom(mcRoom)
205
+ * ```
206
+ */
207
+ declare class RoomBaseModel<TLocation extends LocationBaseModel = LocationBaseModel> extends StoredClassModel {
208
+ /**
209
+ * @param id The id of the room, it must be unique.
210
+ * @param location The location where the room is.
211
+ * @param props The properties of the room.
212
+ */
213
+ constructor(id: string, location: TLocation, props?: RoomBaseModelProps);
214
+ private _location;
215
+ /**
216
+ * The location where the room is.
217
+ */
218
+ get location(): TLocation;
219
+ private _isEntrance?;
220
+ /**
221
+ * Whether is an entrance room, so when the player enters in the location, it will be the first room to be shown.
222
+ */
223
+ get isEntrance(): boolean;
224
+ private defaultName;
225
+ /**
226
+ * The name.
227
+ * If you set undefined, it will return the initial value of name.
228
+ */
229
+ get name(): string;
230
+ set name(value: string | undefined);
231
+ private defaultImage?;
232
+ /**
233
+ * The image. It can be a string, an Element or a Pixi'VN Canvas Item.
234
+ * If you set undefined, it will return the initial value of image.
235
+ */
236
+ get image(): GraphicItemType | Record<any, GraphicItemType> | object | undefined;
237
+ set image(value: GraphicItemType | Record<any, GraphicItemType> | object | undefined);
238
+ private defaultActivityIds;
239
+ /**
240
+ * The activities that are available in this room.
241
+ */
242
+ get defaultActivities(): ActivityRoom<this>[];
243
+ private get activityIds();
244
+ /**
245
+ * The activities that are available in this room.
246
+ */
247
+ get activities(): ActivityRoom<this>[];
248
+ /**
249
+ * Get the memory of an activity. This function can be used into olther libraries to get the memory of the activity.
250
+ * @param id The id of the activity.
251
+ * @returns The memory of the activity.
252
+ */
253
+ getActivityMemory(id: string): object | undefined;
254
+ /**
255
+ * Get the activity by id.
256
+ * @param id The id of the activity.
257
+ * @returns The room activity.
258
+ */
259
+ getActivity(id: string): ActivityRoom<this> | undefined;
260
+ /**
261
+ * Set the memory of an activity. This function can be used into olther libraries to set the memory of the activity.
262
+ * @param id The id of the activity.
263
+ * @param memory The memory of the activity.
264
+ */
265
+ setActivity(activity: ActivityRoom): void;
266
+ /**
267
+ * Add an activity to the room.
268
+ * @param activity The activity to add.
269
+ */
270
+ addActivity(activity: ActivityModel): void;
271
+ /**
272
+ * Remove an activity from the room.
273
+ * @param activity The activity to remove.
274
+ */
275
+ removeActivity(activity: ActivityModel | string): void;
276
+ /**
277
+ * Clear all expired activities.
278
+ */
279
+ clearExpiredActivities(): void;
280
+ private defaultDisabled;
281
+ /**
282
+ * Whether is disabled. If it is a string, it is a Pixi'VN flag name.
283
+ */
284
+ get disabled(): boolean;
285
+ set disabled(value: boolean | string);
286
+ private defaultHidden;
287
+ /**
288
+ * Whether is hidden. If it is a string, it is a Pixi'VN flag name.
289
+ */
290
+ get hidden(): boolean;
291
+ set hidden(value: boolean | string);
292
+ /**
293
+ * The icon element. Can be a string or an Element or a Pixi'VN CanvasItem
294
+ */
295
+ private _icon?;
296
+ get icon(): GraphicItemType | undefined;
297
+ /**
298
+ * Get the character commitments of the room.
299
+ * @returns The character commitments of the room.
300
+ */
301
+ getRoutine<TCommitment extends CommitmentBaseModel = CommitmentBaseModel>(): TCommitment[];
302
+ }
303
+
304
+ interface LocationBaseModelProps {
305
+ /**
306
+ * The name
307
+ * @default ""
308
+ */
309
+ name?: string;
310
+ /**
311
+ * Whether is disabled. You can also pass a Pixi'VN flag name.
312
+ * @default false
313
+ */
314
+ disabled?: boolean | string;
315
+ /**
316
+ * Whether is hidden. You can also pass a Pixi'VN flag name.
317
+ * @default false
318
+ */
319
+ hidden?: boolean | string;
320
+ /**
321
+ * The icon element. Can be a string or an Element or a Pixi'VN CanvasItem
322
+ * @default undefined
323
+ */
324
+ icon?: GraphicItemType;
325
+ }
326
+ /**
327
+ * The base model of a location. I suggest you extend this class to create your own location model.
328
+ * @example
329
+ * ```typescript
330
+ * export const mcHome = new LocationBaseModel('mc_home', mainMap, {
331
+ * name: 'MC Home',
332
+ * icon: "https://icon.jpg",
333
+ * });
334
+ * ```
335
+ */
336
+ declare class LocationBaseModel<TMap extends MapBaseModel = MapBaseModel> extends StoredClassModel {
337
+ /**
338
+ * @param id The id of the location, it must be unique.
339
+ * @param map The map where the location is.
340
+ * @param props The properties of the location.
341
+ */
342
+ constructor(id: string, map: TMap, props?: LocationBaseModelProps);
343
+ private defaultName;
344
+ /**
345
+ * The name of the location.
346
+ * If you set undefined, it will return the initial value of name.
347
+ */
348
+ get name(): string;
349
+ set name(value: string | undefined);
350
+ private defaultDisabled;
351
+ /**
352
+ * Whether is disabled. If it is a string, it is a Pixi'VN flag name.
353
+ */
354
+ get disabled(): boolean;
355
+ set disabled(value: boolean | string);
356
+ private defaultHidden;
357
+ /**
358
+ * Whether is hidden. If it is a string, it is a Pixi'VN flag name.
359
+ */
360
+ get hidden(): boolean;
361
+ set hidden(value: boolean | string);
362
+ private _icon?;
363
+ /**
364
+ * The icon element. Can be a string or an Element or a Pixi'VN CanvasItem
365
+ */
366
+ get icon(): GraphicItemType | undefined;
367
+ private _map;
368
+ /**
369
+ * The map where the location is.
370
+ */
371
+ get map(): TMap;
372
+ /**
373
+ * Get the entrance room of the location.
374
+ * You can cast the room to a specific type that extends RoomBaseModel.
375
+ * @returns The entrance room or the first room if there is no entrance.
376
+ * @example
377
+ * ```typescript
378
+ * const entranceHome = new RoomBaseModel("entrance-home", home, { isEntrance: true })
379
+ * saveRoom(entranceHome)
380
+ * const home = new LocationBaseModel("home", map, { name: "Home" })
381
+ *
382
+ * const entrance = home.getEntrance() // entrance === entranceHome
383
+ * ```
384
+ */
385
+ getEntrance<TRoom extends RoomBaseModel = RoomBaseModel>(): TRoom | undefined;
386
+ /**
387
+ * Get all rooms in the location.
388
+ * You can cast the rooms to a specific type that extends RoomBaseModel.
389
+ * @returns The rooms in the location.
390
+ */
391
+ getRooms<TRoom extends RoomBaseModel = RoomBaseModel>(): TRoom[];
392
+ }
393
+
394
+ interface CommitmentBaseModelProps {
395
+ /**
396
+ * The name
397
+ * @default ""
398
+ */
399
+ name?: string;
400
+ /**
401
+ * The hour when the commitment starts. If the commitment is not started yet, it will be hidden.
402
+ * If you set 3, the commitment will be hidden into hours 1 and 2, and will be shown from hour 3.
403
+ * @default TimeManager.minDayHours
404
+ */
405
+ fromHour?: number;
406
+ /**
407
+ * The hour when the commitment ends. If the commitment is ended yet, it will be hidden.
408
+ * If you set 3, the commitment will be shown into hours 1 and 2 and will be hidden from hour 3.
409
+ * @default TimeManager.maxDayHours + 1
410
+ */
411
+ toHour?: number;
412
+ /**
413
+ * The day when the commitment starts. If the commitment is not started yet, it will be hidden.
414
+ * If you set 3, the commitment will be hidden into days 1 and 2, and will be shown from day 3.
415
+ * @default undefined
416
+ */
417
+ fromDay?: number;
418
+ /**
419
+ * The day when the commitment ends. If the commitment is ended yet, it will be deleted or hidden.
420
+ * If you set 3, the commitment will be shown into days 1 and 2 and will be deleted or hidden from day 3.
421
+ * @default undefined
422
+ */
423
+ toDay?: number;
424
+ /**
425
+ * The image. It can be a string, an Element or a Pixi'VN Canvas Item.
426
+ * Or an object to manage multiple image types. For example to have a image based on time.
427
+ * @example
428
+ * ```ts
429
+ * {
430
+ * "morning": "morning-background.jpg",
431
+ * "afternoon": "afternoon-background.jpg",
432
+ * "evening": "evening-background.jpg",
433
+ * "night": "night-background.jpg"
434
+ * }
435
+ * ```
436
+ * @default undefined
437
+ */
438
+ image?: GraphicItemType | Record<any, GraphicItemType> | object;
439
+ /**
440
+ * 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.
441
+ * @default ExecutionTypeEnum.INTERACTION
442
+ */
443
+ executionType?: ExecutionTypeEnum;
444
+ /**
445
+ * Is a function that is called when the player interacts with the character.
446
+ * @param commitment
447
+ * @returns
448
+ * @default undefined
449
+ */
450
+ onRun?: (commitment: CommitmentBaseModel) => void;
451
+ /**
452
+ * Whether is disabled. You can also pass a Pixi'VN flag name.
453
+ * 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.
454
+ * @default false
455
+ */
456
+ disabled?: boolean | string;
457
+ /**
458
+ * Whether is hidden. You can also pass a Pixi'VN flag name.
459
+ * @default false
460
+ */
461
+ hidden?: boolean | string;
462
+ }
463
+ /**
464
+ * The base model of a commitment. I suggest you extend this class to create your own commitment model.
465
+ * You must use the saveRoom function to save the commitment in the registered commitments.
466
+ * @example
467
+ * ```ts
468
+ * export const mcRoom = new CommitmentBaseModel("test", character, room, {
469
+ * name: "Test",
470
+ * image: "https://image.jpg",
471
+ * executionType: ExecutionTypeEnum.INTERACTION,
472
+ * onRun: (commitment) => {
473
+ * // Do something
474
+ * }
475
+ })
476
+ * saveCommitment(mcRoom)
477
+ * ```
478
+ */
479
+ declare class CommitmentBaseModel<TCharacter extends CharacterBaseModel = CharacterBaseModel, TRoom extends RoomBaseModel = RoomBaseModel> extends StoredClassModel {
480
+ /**
481
+ * @param id The id of the commitment, it must be unique.
482
+ * @param character The character or characters that are in the commitment and so in the room.
483
+ * @param room The room where the commitment is.
484
+ * @param props The properties of the commitment.
485
+ */
486
+ constructor(id: string, character: TCharacter | TCharacter[] | undefined, room: TRoom, props: CommitmentBaseModelProps);
487
+ private _characters;
488
+ /**
489
+ * The character or characters that are in the commitment and so in the room.
490
+ */
491
+ get characters(): TCharacter[];
492
+ private _room;
493
+ /**
494
+ * The room where the commitment is.
495
+ */
496
+ get room(): TRoom;
497
+ private _name;
498
+ /**
499
+ * The name
500
+ */
501
+ get name(): GraphicItemType;
502
+ private defaultFromHour?;
503
+ /**
504
+ * The hour when the commitment starts. If the commitment is not started yet, it will be hidden.
505
+ * If you set undefined, it will return the initial value of fromHour.
506
+ */
507
+ get fromHour(): number;
508
+ set fromHour(value: number | undefined);
509
+ private defaultToHour?;
510
+ /**
511
+ * The hour when the commitment ends. If the commitment is ended yet, it will be hidden.
512
+ * If you set undefined, it will return the initial value of toHour.
513
+ */
514
+ get toHour(): number;
515
+ set toHour(value: number | undefined);
516
+ private defaultFromDay?;
517
+ /**
518
+ * The day when the commitment starts. If the commitment is not started yet, it will be hidden.
519
+ * If you set undefined, it will return the initial value of fromDay.
520
+ */
521
+ get fromDay(): number | undefined;
522
+ set fromDay(value: number | undefined);
523
+ private defaultToDay?;
524
+ /**
525
+ * The day when the commitment ends. If the commitment is ended yet, it will be deleted or hidden.
526
+ * If you set undefined, it will return the initial value of toDay.
527
+ */
528
+ get toDay(): number | undefined;
529
+ set toDay(value: number | undefined);
530
+ private _image?;
531
+ /**
532
+ * The image. It can be a string, an Element or a Pixi'VN Canvas Item.
533
+ */
534
+ get image(): GraphicItemType | Record<any, GraphicItemType> | object | undefined;
535
+ private _executionType;
536
+ /**
537
+ * 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.
538
+ */
539
+ get executionType(): ExecutionTypeEnum;
540
+ private _onRun?;
541
+ /**
542
+ * Is a function that is called when the player interacts with the character.
543
+ */
544
+ onRun(): void;
545
+ private defaultDisabled;
546
+ /**
547
+ * Whether is disabled. You can also pass a Pixi'VN flag name.
548
+ */
549
+ get disabled(): boolean;
550
+ set disabled(value: boolean | string);
551
+ private defaultHidden;
552
+ /**
553
+ * Whether is hidden. You can also pass a Pixi'VN flag name.
554
+ */
555
+ get hidden(): boolean;
556
+ set hidden(value: boolean | string);
557
+ /**
558
+ * Whether the commitment is expired.
559
+ * @returns Whether the commitment is expired.
560
+ */
561
+ isExpired(): boolean;
562
+ }
563
+
564
+ export { ActivityRoom as A, CommitmentBaseModel as C, LocationBaseModel as L, MapBaseModel as M, RoomBaseModel as R, type CommitmentBaseModelProps as a, type LocationBaseModelProps as b, type MapBaseModelProps as c, type RoomBaseModelProps as d, ROOM_CATEGORY as e };