@drincs/nqtr 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{StageProps-CkXejAbn.d.mts → StageProps-D002cyay.d.mts} +30 -2
- package/dist/{StageProps-BFsiCaZT.d.ts → StageProps-DleWO-vf.d.ts} +30 -2
- package/dist/classes/Commitment.d.mts +2 -2
- package/dist/classes/Commitment.d.ts +2 -2
- package/dist/classes/index.d.mts +4 -4
- package/dist/classes/index.d.ts +4 -4
- package/dist/classes/index.js +1 -131
- package/dist/classes/index.js.map +1 -1
- package/dist/classes/index.mjs +3 -132
- package/dist/classes/index.mjs.map +1 -1
- package/dist/classes/navigation/ActivityRoom.d.mts +2 -2
- package/dist/classes/navigation/ActivityRoom.d.ts +2 -2
- package/dist/classes/navigation/Location.d.mts +3 -3
- package/dist/classes/navigation/Location.d.ts +3 -3
- package/dist/classes/navigation/Map.d.mts +3 -3
- package/dist/classes/navigation/Map.d.ts +3 -3
- package/dist/classes/navigation/Room.d.mts +1 -1
- package/dist/classes/navigation/Room.d.ts +1 -1
- package/dist/classes/navigation/Room.js +43 -43
- package/dist/classes/navigation/Room.js.map +1 -1
- package/dist/classes/navigation/Room.mjs +43 -43
- package/dist/classes/navigation/Room.mjs.map +1 -1
- package/dist/classes/quest/Quest.d.mts +1 -1
- package/dist/classes/quest/Quest.d.ts +1 -1
- package/dist/classes/quest/Quest.js +107 -25
- package/dist/classes/quest/Quest.js.map +1 -1
- package/dist/classes/quest/Quest.mjs +107 -25
- package/dist/classes/quest/Quest.mjs.map +1 -1
- package/dist/classes/quest/Stage.d.mts +1 -1
- package/dist/classes/quest/Stage.d.ts +1 -1
- package/dist/classes/quest/Stage.js +34 -9
- package/dist/classes/quest/Stage.js.map +1 -1
- package/dist/classes/quest/Stage.mjs +34 -9
- package/dist/classes/quest/Stage.mjs.map +1 -1
- package/dist/decorators/ActivityDecorator.d.mts +10 -11
- package/dist/decorators/ActivityDecorator.d.ts +10 -11
- package/dist/decorators/ActivityDecorator.js +384 -9
- package/dist/decorators/ActivityDecorator.js.map +1 -1
- package/dist/decorators/ActivityDecorator.mjs +384 -9
- package/dist/decorators/ActivityDecorator.mjs.map +1 -1
- package/dist/decorators/CommitmentDecorator.d.mts +3 -3
- package/dist/decorators/CommitmentDecorator.d.ts +3 -3
- package/dist/decorators/QuestDecorator.d.mts +4 -3
- package/dist/decorators/QuestDecorator.d.ts +4 -3
- package/dist/decorators/QuestDecorator.js +107 -25
- package/dist/decorators/QuestDecorator.js.map +1 -1
- package/dist/decorators/QuestDecorator.mjs +107 -25
- package/dist/decorators/QuestDecorator.mjs.map +1 -1
- package/dist/decorators/RoomDecorator.d.mts +3 -3
- package/dist/decorators/RoomDecorator.d.ts +3 -3
- package/dist/decorators/index.d.mts +3 -3
- package/dist/decorators/index.d.ts +3 -3
- package/dist/decorators/index.js +328 -115
- package/dist/decorators/index.js.map +1 -1
- package/dist/decorators/index.mjs +329 -116
- package/dist/decorators/index.mjs.map +1 -1
- package/dist/functions/ActivityFunctions.d.mts +3 -3
- package/dist/functions/ActivityFunctions.d.ts +3 -3
- package/dist/functions/ActivityFunctions.js.map +1 -1
- package/dist/functions/ActivityFunctions.mjs.map +1 -1
- package/dist/functions/NavigationFunctions.d.mts +3 -3
- package/dist/functions/NavigationFunctions.d.ts +3 -3
- package/dist/functions/NavigationFunctions.js.map +1 -1
- package/dist/functions/NavigationFunctions.mjs.map +1 -1
- package/dist/functions/QuestFunctions.d.mts +8 -0
- package/dist/functions/QuestFunctions.d.ts +8 -0
- package/dist/functions/QuestFunctions.js +21 -0
- package/dist/functions/QuestFunctions.js.map +1 -0
- package/dist/functions/QuestFunctions.mjs +19 -0
- package/dist/functions/QuestFunctions.mjs.map +1 -0
- package/dist/functions/RoutineFunctions.d.mts +3 -3
- package/dist/functions/RoutineFunctions.d.ts +3 -3
- package/dist/functions/index.d.mts +4 -3
- package/dist/functions/index.d.ts +4 -3
- package/dist/functions/index.js +13 -0
- package/dist/functions/index.js.map +1 -1
- package/dist/functions/index.mjs +13 -1
- package/dist/functions/index.mjs.map +1 -1
- package/dist/index.d.mts +6 -5
- package/dist/index.d.ts +6 -5
- package/dist/index.js +254 -165
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +254 -165
- package/dist/index.mjs.map +1 -1
- package/dist/interface/CommitmentProps.d.mts +2 -2
- package/dist/interface/CommitmentProps.d.ts +2 -2
- package/dist/interface/RoomProps.d.mts +2 -2
- package/dist/interface/RoomProps.d.ts +2 -2
- package/dist/interface/index.d.mts +3 -3
- package/dist/interface/index.d.ts +3 -3
- package/dist/interface/navigation/LocationProps.d.mts +3 -3
- package/dist/interface/navigation/LocationProps.d.ts +3 -3
- package/dist/interface/navigation/MapProps.d.mts +3 -3
- package/dist/interface/navigation/MapProps.d.ts +3 -3
- package/dist/interface/quest/QuestProps.d.mts +1 -1
- package/dist/interface/quest/QuestProps.d.ts +1 -1
- package/dist/interface/quest/StageProps.d.mts +1 -1
- package/dist/interface/quest/StageProps.d.ts +1 -1
- package/dist/types/QuestsRequired.d.mts +1 -1
- package/dist/types/QuestsRequired.d.ts +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/{Commitment-BJTIpBQ5.d.ts → Commitment-D3LPSbFX.d.ts} +2 -2
- package/dist/{Commitment-CtNWnNQX.d.mts → Commitment-Eox2652k.d.mts} +2 -2
package/dist/classes/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StoredClassModel, getFlag, GameStorageManager } from '@drincs/pixi-vn';
|
|
2
2
|
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
@@ -259,136 +259,7 @@ var TimeManager = class _TimeManager {
|
|
|
259
259
|
}
|
|
260
260
|
};
|
|
261
261
|
|
|
262
|
-
// src/classes/
|
|
263
|
-
var ActivityModel = class {
|
|
264
|
-
/**
|
|
265
|
-
* @param id The activity id, that must be unique.
|
|
266
|
-
* @param onRun The function that is called when the activity is runned. Have 2 parameters: the runned activity and the yourParams object, that is an object with the parameters that you want to pass to the onRun function.
|
|
267
|
-
* @param props The activity properties.
|
|
268
|
-
*/
|
|
269
|
-
constructor(id, onRun, props) {
|
|
270
|
-
this._id = id;
|
|
271
|
-
this._name = props.name;
|
|
272
|
-
this._fromHour = props.fromHour;
|
|
273
|
-
this._toHour = props.toHour;
|
|
274
|
-
this._fromDay = props.fromDay;
|
|
275
|
-
this._toDay = props.toDay;
|
|
276
|
-
this._disabled = props.disabled || false;
|
|
277
|
-
this._hidden = props.hidden || false;
|
|
278
|
-
this._renderIcon = props.renderIcon;
|
|
279
|
-
this._onRun = onRun;
|
|
280
|
-
}
|
|
281
|
-
/**
|
|
282
|
-
* The activity id, that is unique.
|
|
283
|
-
*/
|
|
284
|
-
get id() {
|
|
285
|
-
return this._id;
|
|
286
|
-
}
|
|
287
|
-
/**
|
|
288
|
-
* The name
|
|
289
|
-
*/
|
|
290
|
-
get name() {
|
|
291
|
-
return this._name;
|
|
292
|
-
}
|
|
293
|
-
/**
|
|
294
|
-
* The hour when the activity starts. If the activity is not started yet, it will be hidden.
|
|
295
|
-
*/
|
|
296
|
-
get fromHour() {
|
|
297
|
-
return this._fromHour;
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* The hour when the activity ends. If the activity is ended yet, it will be hidden.
|
|
301
|
-
*/
|
|
302
|
-
get toHour() {
|
|
303
|
-
return this._toHour;
|
|
304
|
-
}
|
|
305
|
-
/**
|
|
306
|
-
* The day when the activity starts. If the activity is not started yet, it will be hidden.
|
|
307
|
-
*/
|
|
308
|
-
get fromDay() {
|
|
309
|
-
return this._fromDay;
|
|
310
|
-
}
|
|
311
|
-
/**
|
|
312
|
-
* The day when the activity ends. If the activity is ended yet, it will be deleted or hidden.
|
|
313
|
-
*/
|
|
314
|
-
get toDay() {
|
|
315
|
-
return this._toDay;
|
|
316
|
-
}
|
|
317
|
-
/**
|
|
318
|
-
* Whether is disabled.
|
|
319
|
-
*/
|
|
320
|
-
get disabled() {
|
|
321
|
-
if (typeof this._disabled === "string") {
|
|
322
|
-
return getFlag(this._disabled);
|
|
323
|
-
}
|
|
324
|
-
return this._disabled;
|
|
325
|
-
}
|
|
326
|
-
/**
|
|
327
|
-
* Whether is hidden. If the activity is not started yet, it will be hidden.
|
|
328
|
-
*/
|
|
329
|
-
get hidden() {
|
|
330
|
-
if (this.fromDay && this.fromDay > TimeManager.currentDay) {
|
|
331
|
-
return true;
|
|
332
|
-
}
|
|
333
|
-
if (!this.isDeadline) {
|
|
334
|
-
return true;
|
|
335
|
-
}
|
|
336
|
-
if (typeof this._hidden === "string") {
|
|
337
|
-
return getFlag(this._hidden);
|
|
338
|
-
}
|
|
339
|
-
return this._hidden;
|
|
340
|
-
}
|
|
341
|
-
/**
|
|
342
|
-
* The function for rendering the icon of the activity.
|
|
343
|
-
*/
|
|
344
|
-
get renderIcon() {
|
|
345
|
-
let render = this._renderIcon;
|
|
346
|
-
if (render === void 0) {
|
|
347
|
-
return void 0;
|
|
348
|
-
}
|
|
349
|
-
if (typeof render === "function") {
|
|
350
|
-
return (props) => {
|
|
351
|
-
return render(this, props);
|
|
352
|
-
};
|
|
353
|
-
}
|
|
354
|
-
return (props) => render;
|
|
355
|
-
}
|
|
356
|
-
get _initialOnRun() {
|
|
357
|
-
return this._onRun;
|
|
358
|
-
}
|
|
359
|
-
/**
|
|
360
|
-
* The function that is called when the activity is runned.
|
|
361
|
-
*/
|
|
362
|
-
get run() {
|
|
363
|
-
return (props) => this._onRun(this, props);
|
|
364
|
-
}
|
|
365
|
-
/**
|
|
366
|
-
* Whether the activity is a deadline.
|
|
367
|
-
* @returns Whether the activity is a deadline.
|
|
368
|
-
*/
|
|
369
|
-
isDeadline() {
|
|
370
|
-
if (this.toDay && this.toDay <= TimeManager.currentDay) {
|
|
371
|
-
return true;
|
|
372
|
-
}
|
|
373
|
-
return false;
|
|
374
|
-
}
|
|
375
|
-
/**
|
|
376
|
-
* Export the activity properties.
|
|
377
|
-
* @returns The activity properties.
|
|
378
|
-
*/
|
|
379
|
-
export() {
|
|
380
|
-
return {
|
|
381
|
-
name: this._name,
|
|
382
|
-
fromHour: this._fromHour,
|
|
383
|
-
toHour: this._toHour,
|
|
384
|
-
fromDay: this._fromDay,
|
|
385
|
-
toDay: this._toDay,
|
|
386
|
-
disabled: this._disabled,
|
|
387
|
-
hidden: this._hidden,
|
|
388
|
-
renderIcon: this._renderIcon
|
|
389
|
-
};
|
|
390
|
-
}
|
|
391
|
-
};
|
|
262
|
+
// src/classes/Commitment.ts
|
|
392
263
|
var COMMITMENT_CATEGORY = "__nqtr-commitment__";
|
|
393
264
|
var CommitmentBaseModel = class extends StoredClassModel {
|
|
394
265
|
/**
|
|
@@ -1422,6 +1293,6 @@ var RoomBaseModel = class extends StoredClassModel {
|
|
|
1422
1293
|
}
|
|
1423
1294
|
};
|
|
1424
1295
|
|
|
1425
|
-
export {
|
|
1296
|
+
export { ActivityRoom, CommitmentBaseModel, Goal, LocationBaseModel, MapBaseModel, RoomBaseModel, Stage };
|
|
1426
1297
|
//# sourceMappingURL=out.js.map
|
|
1427
1298
|
//# sourceMappingURL=index.mjs.map
|