@drincs/nqtr 0.2.8 → 0.2.9

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 (61) hide show
  1. package/dist/{StageProps-ssZax5Ip.d.ts → StageProps-CCjGI625.d.ts} +4 -4
  2. package/dist/{StageProps-vuObH5D2.d.mts → StageProps-CuE_n1Wg.d.mts} +4 -4
  3. package/dist/classes/index.d.mts +1 -1
  4. package/dist/classes/index.d.ts +1 -1
  5. package/dist/classes/index.js +8 -24
  6. package/dist/classes/index.js.map +1 -1
  7. package/dist/classes/index.mjs +8 -24
  8. package/dist/classes/index.mjs.map +1 -1
  9. package/dist/classes/navigation/Room.js.map +1 -1
  10. package/dist/classes/navigation/Room.mjs.map +1 -1
  11. package/dist/classes/quest/Quest.d.mts +1 -1
  12. package/dist/classes/quest/Quest.d.ts +1 -1
  13. package/dist/classes/quest/Quest.js +8 -24
  14. package/dist/classes/quest/Quest.js.map +1 -1
  15. package/dist/classes/quest/Quest.mjs +8 -24
  16. package/dist/classes/quest/Quest.mjs.map +1 -1
  17. package/dist/classes/quest/Stage.d.mts +1 -1
  18. package/dist/classes/quest/Stage.d.ts +1 -1
  19. package/dist/classes/quest/Stage.js +3 -11
  20. package/dist/classes/quest/Stage.js.map +1 -1
  21. package/dist/classes/quest/Stage.mjs +3 -11
  22. package/dist/classes/quest/Stage.mjs.map +1 -1
  23. package/dist/decorators/QuestDecorator.d.mts +1 -1
  24. package/dist/decorators/QuestDecorator.d.ts +1 -1
  25. package/dist/decorators/QuestDecorator.js +8 -24
  26. package/dist/decorators/QuestDecorator.js.map +1 -1
  27. package/dist/decorators/QuestDecorator.mjs +8 -24
  28. package/dist/decorators/QuestDecorator.mjs.map +1 -1
  29. package/dist/decorators/index.d.mts +1 -1
  30. package/dist/decorators/index.d.ts +1 -1
  31. package/dist/decorators/index.js +8 -24
  32. package/dist/decorators/index.js.map +1 -1
  33. package/dist/decorators/index.mjs +8 -24
  34. package/dist/decorators/index.mjs.map +1 -1
  35. package/dist/functions/ActivityFunctions.js.map +1 -1
  36. package/dist/functions/ActivityFunctions.mjs.map +1 -1
  37. package/dist/functions/NavigationFunctions.js.map +1 -1
  38. package/dist/functions/NavigationFunctions.mjs.map +1 -1
  39. package/dist/functions/QuestFunctions.js.map +1 -1
  40. package/dist/functions/QuestFunctions.mjs.map +1 -1
  41. package/dist/functions/RoutineFunctions.js.map +1 -1
  42. package/dist/functions/RoutineFunctions.mjs.map +1 -1
  43. package/dist/functions/index.js.map +1 -1
  44. package/dist/functions/index.mjs.map +1 -1
  45. package/dist/index.d.mts +1 -1
  46. package/dist/index.d.ts +1 -1
  47. package/dist/index.js +8 -24
  48. package/dist/index.js.map +1 -1
  49. package/dist/index.mjs +8 -24
  50. package/dist/index.mjs.map +1 -1
  51. package/dist/interface/index.d.mts +1 -1
  52. package/dist/interface/index.d.ts +1 -1
  53. package/dist/interface/quest/QuestProps.d.mts +1 -1
  54. package/dist/interface/quest/QuestProps.d.ts +1 -1
  55. package/dist/interface/quest/StageProps.d.mts +1 -1
  56. package/dist/interface/quest/StageProps.d.ts +1 -1
  57. package/dist/types/QuestsRequired.d.mts +1 -1
  58. package/dist/types/QuestsRequired.d.ts +1 -1
  59. package/dist/types/index.d.mts +1 -1
  60. package/dist/types/index.d.ts +1 -1
  61. package/package.json +2 -2
@@ -1062,21 +1062,13 @@ var Stage = class extends StoredClassModel {
1062
1062
  * The function that will be called when the stage starts.
1063
1063
  */
1064
1064
  get onStart() {
1065
- let onStart = this._onStart;
1066
- if (onStart === void 0) {
1067
- return void 0;
1068
- }
1069
- return (props) => onStart(this, props);
1065
+ return this._onStart;
1070
1066
  }
1071
1067
  /**
1072
1068
  * The function that will be called when the stage ends.
1073
1069
  */
1074
1070
  get onEnd() {
1075
- let onEnd = this._onEnd;
1076
- if (onEnd === void 0) {
1077
- return void 0;
1078
- }
1079
- return (props) => onEnd(this, props);
1071
+ return this._onEnd;
1080
1072
  }
1081
1073
  };
1082
1074
  var StageQuest = class extends Stage {
@@ -1179,7 +1171,7 @@ var StageQuest = class extends Stage {
1179
1171
  if (this.canStart) {
1180
1172
  this.started = true;
1181
1173
  if (this.onStart) {
1182
- this.onStart(props);
1174
+ this.onStart(this, props);
1183
1175
  }
1184
1176
  } else {
1185
1177
  console.warn(`[NQTR] Stage ${this.id} can't start`);
@@ -1295,21 +1287,13 @@ var Quest = class extends StoredClassModel {
1295
1287
  * The function that will be called when the quest starts.
1296
1288
  */
1297
1289
  get onStart() {
1298
- let onStart = this._onStart;
1299
- if (onStart === void 0) {
1300
- return void 0;
1301
- }
1302
- return (props) => onStart(this, props);
1290
+ return this._onStart;
1303
1291
  }
1304
1292
  /**
1305
1293
  * The function that will be called when the quest goes to the next stage.
1306
1294
  */
1307
1295
  get onNextStage() {
1308
- let onNext = this._onNextStage;
1309
- if (onNext === void 0) {
1310
- return void 0;
1311
- }
1312
- return (props) => onNext(this, props);
1296
+ return this._onNextStage;
1313
1297
  }
1314
1298
  /**
1315
1299
  * Start the quest.
@@ -1328,7 +1312,7 @@ var Quest = class extends StoredClassModel {
1328
1312
  this.currentStageIndex = 0;
1329
1313
  let currentStage = this.currentStage;
1330
1314
  if (currentStage && currentStage.start) {
1331
- this.onStart && this.onStart(props);
1315
+ this.onStart && this.onStart(this, props);
1332
1316
  return currentStage.start(props);
1333
1317
  } else {
1334
1318
  console.error(`[NQTR] Quest ${this.id} has no start stage`);
@@ -1394,9 +1378,9 @@ var Quest = class extends StoredClassModel {
1394
1378
  return false;
1395
1379
  }
1396
1380
  this.currentStageIndex = currentStageIndex + 1;
1397
- this.onNextStage && this.onNextStage(props);
1381
+ this.onNextStage && this.onNextStage(this, props);
1398
1382
  if (prevStage && prevStage.onEnd) {
1399
- prevStage.onEnd(props);
1383
+ prevStage.onEnd(prevStage, props);
1400
1384
  }
1401
1385
  let nextCurrentStage = this.currentStage;
1402
1386
  if (nextCurrentStage) {