@drincs/nqtr 0.2.7 → 0.2.8

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-Bok_NwL7.d.ts → StageProps-ssZax5Ip.d.ts} +18 -21
  2. package/dist/{StageProps-CFQizpZF.d.mts → StageProps-vuObH5D2.d.mts} +18 -21
  3. package/dist/classes/index.d.mts +1 -1
  4. package/dist/classes/index.d.ts +1 -1
  5. package/dist/classes/index.js +11 -14
  6. package/dist/classes/index.js.map +1 -1
  7. package/dist/classes/index.mjs +11 -14
  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 +11 -14
  14. package/dist/classes/quest/Quest.js.map +1 -1
  15. package/dist/classes/quest/Quest.mjs +11 -14
  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.map +1 -1
  20. package/dist/classes/quest/Stage.mjs.map +1 -1
  21. package/dist/decorators/QuestDecorator.d.mts +1 -1
  22. package/dist/decorators/QuestDecorator.d.ts +1 -1
  23. package/dist/decorators/QuestDecorator.js +11 -14
  24. package/dist/decorators/QuestDecorator.js.map +1 -1
  25. package/dist/decorators/QuestDecorator.mjs +11 -14
  26. package/dist/decorators/QuestDecorator.mjs.map +1 -1
  27. package/dist/decorators/index.d.mts +1 -1
  28. package/dist/decorators/index.d.ts +1 -1
  29. package/dist/decorators/index.js +11 -14
  30. package/dist/decorators/index.js.map +1 -1
  31. package/dist/decorators/index.mjs +11 -14
  32. package/dist/decorators/index.mjs.map +1 -1
  33. package/dist/functions/ActivityFunctions.js.map +1 -1
  34. package/dist/functions/ActivityFunctions.mjs.map +1 -1
  35. package/dist/functions/NavigationFunctions.js.map +1 -1
  36. package/dist/functions/NavigationFunctions.mjs.map +1 -1
  37. package/dist/functions/QuestFunctions.d.mts +2 -2
  38. package/dist/functions/QuestFunctions.d.ts +2 -2
  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 +11 -14
  48. package/dist/index.js.map +1 -1
  49. package/dist/index.mjs +11 -14
  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
package/dist/index.mjs CHANGED
@@ -1552,11 +1552,10 @@ var Quest = class extends StoredClassModel {
1552
1552
  /**
1553
1553
  * Go to the next stage if the current stage is completed.
1554
1554
  * If you want to force the change of stage, use goNextStage.
1555
- * @param startProps The properties for the start stage. If you not want to pass any property, you can pass an {}.
1556
- * @param endProps The properties for the end stage. If you not want to pass any property, you can pass an {}.
1555
+ * @param props The properties. If you not want to pass any property, you can pass an {}.
1557
1556
  * @returns true if the stage was changed, false otherwise.
1558
1557
  */
1559
- tryToGoNextStage(startProps, endProps) {
1558
+ tryToGoNextStage(props) {
1560
1559
  if (!this.started) {
1561
1560
  return false;
1562
1561
  }
@@ -1569,34 +1568,32 @@ var Quest = class extends StoredClassModel {
1569
1568
  return false;
1570
1569
  }
1571
1570
  if (currentStage.completed) {
1572
- return this.goNextStage(startProps, endProps);
1571
+ return this.goNextStage(props);
1573
1572
  }
1574
1573
  return false;
1575
1574
  }
1576
1575
  /**
1577
1576
  * Complete the current stage and go to the next stage.
1578
1577
  * If you want to go to the next stage only if the current stage is completed, use tryToGoNextStage.
1579
- * @param startProps The properties for the start stage. If you not want to pass any property, you can pass an {}.
1580
- * @param endProps The properties for the end stage. If you not want to pass any property, you can pass an {}.
1578
+ * @param props The properties. If you not want to pass any property, you can pass an {}.
1581
1579
  * @returns true if the stage was changed, false otherwise.
1582
1580
  */
1583
- completeCurrentStageAndGoNext(startProps, endProps) {
1581
+ completeCurrentStageAndGoNext(props) {
1584
1582
  let currentStage = this.currentStage;
1585
1583
  if (!currentStage) {
1586
1584
  console.error(`[NQTR] Quest ${this.id} has no current stage`);
1587
1585
  return false;
1588
1586
  }
1589
1587
  currentStage.completed = true;
1590
- return this.goNextStage(startProps, endProps);
1588
+ return this.goNextStage(props);
1591
1589
  }
1592
1590
  /**
1593
1591
  * Go to the next stage without checking if the current stage is completed.
1594
1592
  * If you want to go to the next stage only if the current stage is completed, use tryToGoNextStage.
1595
- * @param startProps
1596
- * @param endProps
1593
+ * @param props The properties. If you not want to pass any property, you can pass an {}.
1597
1594
  * @returns returns true if the stage was changed, false otherwise.
1598
1595
  */
1599
- goNextStage(startProps, endProps) {
1596
+ goNextStage(props) {
1600
1597
  if (!this.started) {
1601
1598
  console.warn(`[NQTR] Quest ${this.id} is not started`);
1602
1599
  return false;
@@ -1612,15 +1609,15 @@ var Quest = class extends StoredClassModel {
1612
1609
  return false;
1613
1610
  }
1614
1611
  this.currentStageIndex = currentStageIndex + 1;
1615
- this.onNextStage && this.onNextStage(endProps);
1612
+ this.onNextStage && this.onNextStage(props);
1616
1613
  if (prevStage && prevStage.onEnd) {
1617
- prevStage.onEnd(endProps);
1614
+ prevStage.onEnd(props);
1618
1615
  }
1619
1616
  let nextCurrentStage = this.currentStage;
1620
1617
  if (nextCurrentStage) {
1621
1618
  nextCurrentStage.inizialize();
1622
1619
  if (this.currentStageMustStart) {
1623
- this.startCurrentStage(startProps);
1620
+ this.startCurrentStage(props);
1624
1621
  }
1625
1622
  }
1626
1623
  return true;