@drincs/nqtr 0.1.18 → 0.1.20

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 (167) hide show
  1. package/dist/{Commitment-DNn_TEgV.d.mts → Commitment-C3Nc2RJH.d.mts} +17 -4
  2. package/dist/{Commitment-GIA4EK_q.d.ts → Commitment-Cc2kZEy0.d.ts} +17 -4
  3. package/dist/Quest-BQ1pwvQ_.d.ts +197 -0
  4. package/dist/Quest-DaNlPBHb.d.mts +197 -0
  5. package/dist/classes/Commitment.d.mts +2 -2
  6. package/dist/classes/Commitment.d.ts +2 -2
  7. package/dist/classes/Commitment.js +12 -1
  8. package/dist/classes/Commitment.js.map +1 -1
  9. package/dist/classes/Commitment.mjs +12 -1
  10. package/dist/classes/Commitment.mjs.map +1 -1
  11. package/dist/classes/index.d.mts +4 -4
  12. package/dist/classes/index.d.ts +4 -4
  13. package/dist/classes/index.js +514 -313
  14. package/dist/classes/index.js.map +1 -1
  15. package/dist/classes/index.mjs +512 -312
  16. package/dist/classes/index.mjs.map +1 -1
  17. package/dist/classes/navigation/ActivityRoom.d.mts +2 -2
  18. package/dist/classes/navigation/ActivityRoom.d.ts +2 -2
  19. package/dist/classes/navigation/ActivityRoom.js +1 -1
  20. package/dist/classes/navigation/ActivityRoom.js.map +1 -1
  21. package/dist/classes/navigation/ActivityRoom.mjs +1 -1
  22. package/dist/classes/navigation/ActivityRoom.mjs.map +1 -1
  23. package/dist/classes/navigation/Location.d.mts +2 -2
  24. package/dist/classes/navigation/Location.d.ts +2 -2
  25. package/dist/classes/navigation/Location.js.map +1 -1
  26. package/dist/classes/navigation/Location.mjs.map +1 -1
  27. package/dist/classes/navigation/Map.d.mts +2 -2
  28. package/dist/classes/navigation/Map.d.ts +2 -2
  29. package/dist/classes/navigation/Map.js.map +1 -1
  30. package/dist/classes/navigation/Map.mjs.map +1 -1
  31. package/dist/classes/navigation/Room.d.mts +2 -2
  32. package/dist/classes/navigation/Room.d.ts +2 -2
  33. package/dist/classes/navigation/Room.js +15 -15
  34. package/dist/classes/navigation/Room.js.map +1 -1
  35. package/dist/classes/navigation/Room.mjs +15 -15
  36. package/dist/classes/navigation/Room.mjs.map +1 -1
  37. package/dist/classes/quest/Goal.d.mts +21 -13
  38. package/dist/classes/quest/Goal.d.ts +21 -13
  39. package/dist/classes/quest/Goal.js +50 -15
  40. package/dist/classes/quest/Goal.js.map +1 -1
  41. package/dist/classes/quest/Goal.mjs +47 -15
  42. package/dist/classes/quest/Goal.mjs.map +1 -1
  43. package/dist/classes/quest/Quest.d.mts +3 -2
  44. package/dist/classes/quest/Quest.d.ts +3 -2
  45. package/dist/classes/quest/Quest.js +536 -9
  46. package/dist/classes/quest/Quest.js.map +1 -1
  47. package/dist/classes/quest/Quest.mjs +537 -10
  48. package/dist/classes/quest/Quest.mjs.map +1 -1
  49. package/dist/classes/quest/Stage.d.mts +3 -2
  50. package/dist/classes/quest/Stage.d.ts +3 -2
  51. package/dist/classes/quest/Stage.js +396 -51
  52. package/dist/classes/quest/Stage.js.map +1 -1
  53. package/dist/classes/quest/Stage.mjs +394 -52
  54. package/dist/classes/quest/Stage.mjs.map +1 -1
  55. package/dist/decorators/ActivityDecorator.d.mts +1 -1
  56. package/dist/decorators/ActivityDecorator.d.ts +1 -1
  57. package/dist/decorators/ActivityDecorator.js.map +1 -1
  58. package/dist/decorators/ActivityDecorator.mjs.map +1 -1
  59. package/dist/decorators/CommitmentDecorator.d.mts +32 -6
  60. package/dist/decorators/CommitmentDecorator.d.ts +32 -6
  61. package/dist/decorators/CommitmentDecorator.js +7 -7
  62. package/dist/decorators/CommitmentDecorator.js.map +1 -1
  63. package/dist/decorators/CommitmentDecorator.mjs +5 -5
  64. package/dist/decorators/CommitmentDecorator.mjs.map +1 -1
  65. package/dist/decorators/QuestDecorator.d.mts +28 -0
  66. package/dist/decorators/QuestDecorator.d.ts +28 -0
  67. package/dist/decorators/QuestDecorator.js +33 -0
  68. package/dist/decorators/QuestDecorator.js.map +1 -0
  69. package/dist/decorators/QuestDecorator.mjs +29 -0
  70. package/dist/decorators/QuestDecorator.mjs.map +1 -0
  71. package/dist/decorators/RoomDecorator.d.mts +3 -3
  72. package/dist/decorators/RoomDecorator.d.ts +3 -3
  73. package/dist/decorators/RoomDecorator.js.map +1 -1
  74. package/dist/decorators/RoomDecorator.mjs.map +1 -1
  75. package/dist/decorators/index.d.mts +8 -3
  76. package/dist/decorators/index.d.ts +8 -3
  77. package/dist/decorators/index.js +30 -15
  78. package/dist/decorators/index.js.map +1 -1
  79. package/dist/decorators/index.mjs +27 -12
  80. package/dist/decorators/index.mjs.map +1 -1
  81. package/dist/functions/ActivityFunctions.d.mts +2 -2
  82. package/dist/functions/ActivityFunctions.d.ts +2 -2
  83. package/dist/functions/ActivityFunctions.js.map +1 -1
  84. package/dist/functions/ActivityFunctions.mjs.map +1 -1
  85. package/dist/functions/NavigationFunctions.d.mts +2 -2
  86. package/dist/functions/NavigationFunctions.d.ts +2 -2
  87. package/dist/functions/NavigationFunctions.js.map +1 -1
  88. package/dist/functions/NavigationFunctions.mjs.map +1 -1
  89. package/dist/functions/RoutineFunctions.d.mts +21 -4
  90. package/dist/functions/RoutineFunctions.d.ts +21 -4
  91. package/dist/functions/RoutineFunctions.js +16 -16
  92. package/dist/functions/RoutineFunctions.js.map +1 -1
  93. package/dist/functions/RoutineFunctions.mjs +16 -16
  94. package/dist/functions/RoutineFunctions.mjs.map +1 -1
  95. package/dist/functions/index.d.mts +3 -3
  96. package/dist/functions/index.d.ts +3 -3
  97. package/dist/functions/index.js +16 -16
  98. package/dist/functions/index.js.map +1 -1
  99. package/dist/functions/index.mjs +16 -16
  100. package/dist/functions/index.mjs.map +1 -1
  101. package/dist/index.d.mts +7 -6
  102. package/dist/index.d.ts +7 -6
  103. package/dist/index.js +543 -326
  104. package/dist/index.js.map +1 -1
  105. package/dist/index.mjs +536 -319
  106. package/dist/index.mjs.map +1 -1
  107. package/dist/interface/CommitmentProps.d.mts +2 -2
  108. package/dist/interface/CommitmentProps.d.ts +2 -2
  109. package/dist/interface/RoomProps.d.mts +2 -2
  110. package/dist/interface/RoomProps.d.ts +2 -2
  111. package/dist/interface/index.d.mts +4 -4
  112. package/dist/interface/index.d.ts +4 -4
  113. package/dist/interface/navigation/LocationProps.d.mts +2 -2
  114. package/dist/interface/navigation/LocationProps.d.ts +2 -2
  115. package/dist/interface/navigation/MapProps.d.mts +2 -2
  116. package/dist/interface/navigation/MapProps.d.ts +2 -2
  117. package/dist/interface/quest/GoalProps.d.mts +12 -0
  118. package/dist/interface/quest/GoalProps.d.ts +12 -0
  119. package/dist/interface/quest/QuestProps.d.mts +6 -9
  120. package/dist/interface/quest/QuestProps.d.ts +6 -9
  121. package/dist/interface/quest/StageFlags.d.mts +12 -0
  122. package/dist/interface/quest/StageFlags.d.ts +12 -0
  123. package/dist/interface/quest/StageFlags.js +4 -0
  124. package/dist/interface/quest/StageFlags.js.map +1 -0
  125. package/dist/interface/quest/StageFlags.mjs +3 -0
  126. package/dist/interface/quest/StageFlags.mjs.map +1 -0
  127. package/dist/interface/quest/StageProps.d.mts +3 -2
  128. package/dist/interface/quest/StageProps.d.ts +3 -2
  129. package/dist/override/OnEndStage.d.mts +19 -0
  130. package/dist/override/OnEndStage.d.ts +19 -0
  131. package/dist/override/OnEndStage.js +4 -0
  132. package/dist/override/OnEndStage.js.map +1 -0
  133. package/dist/override/OnEndStage.mjs +3 -0
  134. package/dist/override/OnEndStage.mjs.map +1 -0
  135. package/dist/override/OnStartStage.d.mts +19 -0
  136. package/dist/override/OnStartStage.d.ts +19 -0
  137. package/dist/override/OnStartStage.js +4 -0
  138. package/dist/override/OnStartStage.js.map +1 -0
  139. package/dist/override/OnStartStage.mjs +3 -0
  140. package/dist/override/OnStartStage.mjs.map +1 -0
  141. package/dist/override/index.d.mts +2 -0
  142. package/dist/override/index.d.ts +2 -0
  143. package/dist/types/ExecutionType.d.mts +3 -0
  144. package/dist/types/ExecutionType.d.ts +3 -0
  145. package/dist/types/ExecutionType.js +4 -0
  146. package/dist/types/ExecutionType.js.map +1 -0
  147. package/dist/types/ExecutionType.mjs +3 -0
  148. package/dist/types/ExecutionType.mjs.map +1 -0
  149. package/dist/types/QuestsRequired.d.mts +3 -2
  150. package/dist/types/QuestsRequired.d.ts +3 -2
  151. package/dist/types/index.d.mts +4 -2
  152. package/dist/types/index.d.ts +4 -2
  153. package/package.json +1 -1
  154. package/dist/Quest-Bdm0R9LA.d.mts +0 -71
  155. package/dist/Quest-CxJcXETG.d.ts +0 -71
  156. package/dist/enums/ExecutionTypeEnum.d.mts +0 -6
  157. package/dist/enums/ExecutionTypeEnum.d.ts +0 -6
  158. package/dist/enums/ExecutionTypeEnum.js +0 -12
  159. package/dist/enums/ExecutionTypeEnum.js.map +0 -1
  160. package/dist/enums/ExecutionTypeEnum.mjs +0 -10
  161. package/dist/enums/ExecutionTypeEnum.mjs.map +0 -1
  162. package/dist/enums/index.d.mts +0 -1
  163. package/dist/enums/index.d.ts +0 -1
  164. package/dist/enums/index.js +0 -12
  165. package/dist/enums/index.js.map +0 -1
  166. package/dist/enums/index.mjs +0 -10
  167. package/dist/enums/index.mjs.map +0 -1
package/dist/index.mjs CHANGED
@@ -389,15 +389,6 @@ var ActivityModel = class {
389
389
  };
390
390
  }
391
391
  };
392
-
393
- // src/enums/ExecutionTypeEnum.ts
394
- var ExecutionTypeEnum = /* @__PURE__ */ ((ExecutionTypeEnum2) => {
395
- ExecutionTypeEnum2["AUTOMATIC"] = "automatic";
396
- ExecutionTypeEnum2["INTERACTION"] = "interaction";
397
- return ExecutionTypeEnum2;
398
- })(ExecutionTypeEnum || {});
399
-
400
- // src/classes/Commitment.ts
401
392
  var COMMITMENT_CATEGORY = "__nqtr-commitment__";
402
393
  var CommitmentBaseModel = class extends StoredClassModel {
403
394
  /**
@@ -416,11 +407,12 @@ var CommitmentBaseModel = class extends StoredClassModel {
416
407
  this.defaultFromDay = props.fromDay;
417
408
  this.defaultToDay = props.toDay;
418
409
  this._renderImage = props.renderImage;
419
- this._executionType = props.executionType || "interaction" /* INTERACTION */;
410
+ this._executionType = props.executionType || "interaction";
420
411
  this._onRun = props.onRun;
421
412
  this.defaultDisabled = props.disabled || false;
422
413
  this.defaultHidden = props.hidden || false;
423
414
  this._renderIcon = props.renderIcon;
415
+ this.defaultPriority = props.priority || 0;
424
416
  }
425
417
  /**
426
418
  * The character or characters that are in the commitment and so in the room.
@@ -562,6 +554,16 @@ var CommitmentBaseModel = class extends StoredClassModel {
562
554
  set hidden(value) {
563
555
  this.setStorageProperty("hidden", value);
564
556
  }
557
+ /**
558
+ * The priority. The higher the number, the higher the priority.
559
+ * 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.
560
+ */
561
+ get priority() {
562
+ return this.getStorageProperty("priority") || this.defaultPriority || 0;
563
+ }
564
+ set priority(value) {
565
+ this.setStorageProperty("priority", value);
566
+ }
565
567
  /**
566
568
  * Whether the commitment is expired.
567
569
  * @returns Whether the commitment is expired.
@@ -573,6 +575,199 @@ var CommitmentBaseModel = class extends StoredClassModel {
573
575
  return false;
574
576
  }
575
577
  };
578
+ var ActivityStoredAbstract = class {
579
+ /**
580
+ * @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.
581
+ * @param props The activity properties.
582
+ */
583
+ constructor(onRun, props) {
584
+ this.defaultName = props.name;
585
+ this.defaultFromHour = props.fromHour;
586
+ this.defaultToHour = props.toHour;
587
+ this.defaultFromDay = props.fromDay;
588
+ this.defaultToDay = props.toDay;
589
+ this.defaultDisabled = props.disabled || false;
590
+ this.defaultHidden = props.hidden || false;
591
+ this._renderIcon = props.renderIcon;
592
+ this._onRun = onRun;
593
+ }
594
+ /**
595
+ * The name
596
+ */
597
+ get name() {
598
+ return this.getStorageProperty("name") || this.defaultName || "";
599
+ }
600
+ set name(value) {
601
+ this.setStorageProperty("name", value);
602
+ }
603
+ /**
604
+ * The hour when the activity starts. If the activity is not started yet, it will be hidden.
605
+ */
606
+ get fromHour() {
607
+ return this.getStorageProperty("fromHour") || this.defaultFromHour || TimeManager.minDayHours;
608
+ }
609
+ set fromHour(value) {
610
+ this.setStorageProperty("fromHour", value);
611
+ }
612
+ /**
613
+ * The hour when the activity ends. If the activity is ended yet, it will be hidden.
614
+ */
615
+ get toHour() {
616
+ return this.getStorageProperty("toHour") || this.defaultToHour || TimeManager.maxDayHours + 1;
617
+ }
618
+ set toHour(value) {
619
+ this.setStorageProperty("toHour", value);
620
+ }
621
+ /**
622
+ * The day when the activity starts. If the activity is not started yet, it will be hidden.
623
+ */
624
+ get fromDay() {
625
+ return this.getStorageProperty("fromDay") || this.defaultFromDay;
626
+ }
627
+ set fromDay(value) {
628
+ this.setStorageProperty("fromDay", value);
629
+ }
630
+ /**
631
+ * The day when the activity ends. If the activity is ended yet, it will be deleted or hidden.
632
+ */
633
+ get toDay() {
634
+ return this.getStorageProperty("toDay") || this.defaultToDay;
635
+ }
636
+ set toDay(value) {
637
+ this.setStorageProperty("toDay", value);
638
+ }
639
+ /**
640
+ * Whether is disabled.
641
+ */
642
+ get disabled() {
643
+ let value = this.getStorageProperty("disabled") || this.defaultDisabled;
644
+ if (typeof value === "string") {
645
+ return getFlag(value);
646
+ }
647
+ return value;
648
+ }
649
+ set disabled(value) {
650
+ this.setStorageProperty("disabled", value);
651
+ }
652
+ /**
653
+ * Whether is hidden. If the activity is not started yet, it will be hidden.
654
+ */
655
+ get hidden() {
656
+ if (this.fromDay && this.fromDay > TimeManager.currentDay) {
657
+ return true;
658
+ }
659
+ if (!TimeManager.nowIsBetween(this.fromHour, this.toHour)) {
660
+ return true;
661
+ }
662
+ if (!this.isExpired) {
663
+ return true;
664
+ }
665
+ let value = this.getStorageProperty("hidden") || this.defaultHidden;
666
+ if (typeof value === "string") {
667
+ return getFlag(value);
668
+ }
669
+ return value;
670
+ }
671
+ set hidden(value) {
672
+ this.setStorageProperty("hidden", value);
673
+ }
674
+ /**
675
+ * The function for rendering the icon of the activity.
676
+ */
677
+ get renderIcon() {
678
+ let render = this._renderIcon;
679
+ if (render === void 0) {
680
+ return void 0;
681
+ }
682
+ if (typeof render === "function") {
683
+ return (props) => {
684
+ return render(this, props);
685
+ };
686
+ }
687
+ return (props) => render;
688
+ }
689
+ /**
690
+ * The function that is called when the activity is runned.
691
+ */
692
+ get onRun() {
693
+ return (props) => {
694
+ return this._onRun(this, props);
695
+ };
696
+ }
697
+ /**
698
+ * Whether the activity is a deadline.
699
+ * @returns Whether the activity is a deadline.
700
+ */
701
+ isExpired() {
702
+ if (this.toDay && this.toDay <= TimeManager.currentDay) {
703
+ return true;
704
+ }
705
+ return false;
706
+ }
707
+ /**
708
+ * Export the activity properties.
709
+ * @returns The activity properties.
710
+ */
711
+ export() {
712
+ return {
713
+ name: this.getStorageProperty("name") || this.defaultName,
714
+ fromHour: this.getStorageProperty("fromHour") || this.defaultFromHour,
715
+ toHour: this.getStorageProperty("toHour") || this.defaultToHour,
716
+ fromDay: this.getStorageProperty("fromDay") || this.defaultFromDay,
717
+ toDay: this.getStorageProperty("toDay") || this.defaultToDay,
718
+ disabled: this.getStorageProperty("disabled") || this.defaultDisabled,
719
+ hidden: this.getStorageProperty("hidden") || this.defaultHidden,
720
+ renderIcon: this._renderIcon
721
+ };
722
+ }
723
+ };
724
+
725
+ // src/classes/navigation/ActivityRoom.ts
726
+ var ActivityRoom = class extends ActivityStoredAbstract {
727
+ constructor(id, room, onRun, props) {
728
+ super(onRun, props);
729
+ this._id = id;
730
+ this._room = room;
731
+ }
732
+ setStorageProperty(_, __) {
733
+ this._room.setActivity(this);
734
+ }
735
+ getStorageProperty(propertyName) {
736
+ let activity = this._room.getActivityMemory(this.id);
737
+ if (!activity || !activity.hasOwnProperty(propertyName)) {
738
+ return void 0;
739
+ }
740
+ return activity[propertyName];
741
+ }
742
+ get id() {
743
+ return this._id;
744
+ }
745
+ get room() {
746
+ return this._room;
747
+ }
748
+ export() {
749
+ let result = {};
750
+ if (this.name !== void 0) {
751
+ result["name"] = this.name;
752
+ }
753
+ if (this.fromHour !== void 0) {
754
+ result["fromHour"] = this.fromHour;
755
+ }
756
+ if (this.toHour !== void 0) {
757
+ result["toHour"] = this.toHour;
758
+ }
759
+ if (this.fromDay !== void 0) {
760
+ result["fromDay"] = this.fromDay;
761
+ }
762
+ if (this.toDay !== void 0) {
763
+ result["toDay"] = this.toDay;
764
+ }
765
+ if (this.disabled !== void 0) {
766
+ result["disabled"] = this.disabled;
767
+ }
768
+ return result;
769
+ }
770
+ };
576
771
 
577
772
  // src/decorators/RoomDecorator.ts
578
773
  var registeredRooms = {};
@@ -865,9 +1060,9 @@ function getCommitmentById(id) {
865
1060
  return;
866
1061
  }
867
1062
  }
868
- function setFixedCommitments(commitments) {
1063
+ function setFixedRoutine(commitments) {
869
1064
  if (Array.isArray(commitments)) {
870
- commitments.forEach((c) => setFixedCommitments(c));
1065
+ commitments.forEach((c) => setFixedRoutine(c));
871
1066
  return;
872
1067
  }
873
1068
  if (fixedCommitments[commitments.id]) {
@@ -875,7 +1070,7 @@ function setFixedCommitments(commitments) {
875
1070
  }
876
1071
  fixedCommitments[commitments.id] = commitments;
877
1072
  }
878
- function addTemporaryCommitment(commitment) {
1073
+ function addCommitment(commitment) {
879
1074
  if (!Array.isArray(commitment)) {
880
1075
  commitment = [commitment];
881
1076
  }
@@ -889,7 +1084,7 @@ function addTemporaryCommitment(commitment) {
889
1084
  }).filter((id) => id !== void 0);
890
1085
  GameStorageManager.setVariable(TEMPORARY_COMMITMENT_CATEGORY_MEMORY_KEY, [commitmentsIds]);
891
1086
  }
892
- function getFixedCommitments() {
1087
+ function getFixedRoutine() {
893
1088
  return Object.values(fixedCommitments);
894
1089
  }
895
1090
  function getTemporaryCommitments() {
@@ -901,6 +1096,32 @@ function getTemporaryCommitments() {
901
1096
  return commitments;
902
1097
  }
903
1098
 
1099
+ // src/decorators/QuestDecorator.ts
1100
+ var registeredQuests = {};
1101
+ function saveQuest(quest) {
1102
+ if (Array.isArray(quest)) {
1103
+ quest.forEach((c) => saveQuest(c));
1104
+ return;
1105
+ }
1106
+ if (registeredQuests[quest.id]) {
1107
+ console.warn(`[NQTR] Quest id ${quest.id} already exists, it will be overwritten`);
1108
+ }
1109
+ registeredQuests[quest.id] = quest;
1110
+ }
1111
+ function getQuestById(id) {
1112
+ try {
1113
+ let quest = registeredQuests[id];
1114
+ if (!quest) {
1115
+ console.error(`[NQTR] Quest ${id} not found`);
1116
+ return;
1117
+ }
1118
+ return quest;
1119
+ } catch (e) {
1120
+ console.error(`[NQTR] Error while getting Quest ${id}`, e);
1121
+ return;
1122
+ }
1123
+ }
1124
+
904
1125
  // src/functions/RoutineFunctions.ts
905
1126
  function clearExpiredRoutine() {
906
1127
  Object.entries(registeredCommitments).forEach(([_, commitment]) => {
@@ -909,271 +1130,78 @@ function clearExpiredRoutine() {
909
1130
  }
910
1131
  });
911
1132
  }
912
- function getCurrentCommitments() {
1133
+ function getCurrentRoutine() {
913
1134
  let character_commitments = {};
914
- let oltherCommitments = [];
915
1135
  getTemporaryCommitments().reverse().forEach((c) => {
916
1136
  if (!c.hidden) {
917
- if (c.characters.length > 1) {
918
- let allAvailable = c.characters.every((ch) => !character_commitments[ch.id]);
1137
+ if (c.characters.length > 0) {
1138
+ let allAvailable = c.characters.every((ch) => !character_commitments[ch.id] || c.priority > character_commitments[ch.id].priority);
919
1139
  if (allAvailable) {
920
1140
  c.characters.forEach((ch) => {
921
1141
  character_commitments[ch.id] = c;
922
1142
  });
923
1143
  }
924
1144
  } else {
925
- oltherCommitments.push(c);
1145
+ console.error(`[NQTR] The commitment ${c.id} has no characters assigned`);
926
1146
  }
927
1147
  }
928
1148
  });
929
- getFixedCommitments().reverse().forEach((c) => {
1149
+ getFixedRoutine().reverse().forEach((c) => {
930
1150
  if (!c.hidden) {
931
- if (c.characters.length > 1) {
932
- c.characters.forEach((ch) => {
933
- if (!character_commitments[ch.id]) {
1151
+ if (c.characters.length > 0) {
1152
+ let allAvailable = c.characters.every((ch) => !character_commitments[ch.id] || c.priority > character_commitments[ch.id].priority);
1153
+ if (allAvailable) {
1154
+ c.characters.forEach((ch) => {
934
1155
  character_commitments[ch.id] = c;
935
- }
936
- });
1156
+ });
1157
+ }
937
1158
  } else {
938
- oltherCommitments.push(c);
1159
+ console.error(`[NQTR] The commitment ${c.id} has no characters assigned`);
939
1160
  }
940
1161
  }
941
1162
  });
942
- return Object.values(character_commitments).concat(oltherCommitments);
1163
+ return Object.values(character_commitments);
943
1164
  }
944
1165
  function getCommitmentByCharacter(character) {
945
- getCurrentCommitments().forEach((c) => {
1166
+ getCurrentRoutine().forEach((c) => {
946
1167
  if (c.characters.map((ch) => ch.id).includes(character.id)) {
947
1168
  return c;
948
1169
  }
949
1170
  });
950
1171
  return void 0;
951
1172
  }
952
- var ActivityStoredAbstract = class {
1173
+
1174
+ // src/classes/navigation/Room.ts
1175
+ var ROOM_CATEGORY = "__nqtr-room__";
1176
+ var RoomBaseModel = class extends StoredClassModel {
953
1177
  /**
954
- * @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.
955
- * @param props The activity properties.
1178
+ * @param id The id of the room, it must be unique.
1179
+ * @param location The location where the room is.
1180
+ * @param props The properties of the room.
956
1181
  */
957
- constructor(onRun, props) {
958
- this.defaultName = props.name;
959
- this.defaultFromHour = props.fromHour;
960
- this.defaultToHour = props.toHour;
961
- this.defaultFromDay = props.fromDay;
962
- this.defaultToDay = props.toDay;
1182
+ constructor(id, location, props = {}) {
1183
+ var _a;
1184
+ super(ROOM_CATEGORY, id);
1185
+ this._location = location;
1186
+ this.defaultName = props.name || "";
1187
+ this._renderImage = props.renderImage;
1188
+ this.defaultActivityIds = ((_a = props.defaultActivities) == null ? void 0 : _a.map((activity) => activity.id)) || [];
963
1189
  this.defaultDisabled = props.disabled || false;
964
1190
  this.defaultHidden = props.hidden || false;
965
1191
  this._renderIcon = props.renderIcon;
966
- this._onRun = onRun;
1192
+ this._isEntrance = props.isEntrance;
967
1193
  }
968
1194
  /**
969
- * The name
1195
+ * The location where the room is.
970
1196
  */
971
- get name() {
972
- return this.getStorageProperty("name") || this.defaultName || "";
973
- }
974
- set name(value) {
975
- this.setStorageProperty("name", value);
1197
+ get location() {
1198
+ return this._location;
976
1199
  }
977
1200
  /**
978
- * The hour when the activity starts. If the activity is not started yet, it will be hidden.
1201
+ * Whether is an entrance room, so when the player enters in the location, it will be the first room to be shown.
979
1202
  */
980
- get fromHour() {
981
- return this.getStorageProperty("fromHour") || this.defaultFromHour || TimeManager.minDayHours;
982
- }
983
- set fromHour(value) {
984
- this.setStorageProperty("fromHour", value);
985
- }
986
- /**
987
- * The hour when the activity ends. If the activity is ended yet, it will be hidden.
988
- */
989
- get toHour() {
990
- return this.getStorageProperty("toHour") || this.defaultToHour || TimeManager.maxDayHours + 1;
991
- }
992
- set toHour(value) {
993
- this.setStorageProperty("toHour", value);
994
- }
995
- /**
996
- * The day when the activity starts. If the activity is not started yet, it will be hidden.
997
- */
998
- get fromDay() {
999
- return this.getStorageProperty("fromDay") || this.defaultFromDay;
1000
- }
1001
- set fromDay(value) {
1002
- this.setStorageProperty("fromDay", value);
1003
- }
1004
- /**
1005
- * The day when the activity ends. If the activity is ended yet, it will be deleted or hidden.
1006
- */
1007
- get toDay() {
1008
- return this.getStorageProperty("toDay") || this.defaultToDay;
1009
- }
1010
- set toDay(value) {
1011
- this.setStorageProperty("toDay", value);
1012
- }
1013
- /**
1014
- * Whether is disabled.
1015
- */
1016
- get disabled() {
1017
- let value = this.getStorageProperty("disabled") || this.defaultDisabled;
1018
- if (typeof value === "string") {
1019
- return getFlag(value);
1020
- }
1021
- return value;
1022
- }
1023
- set disabled(value) {
1024
- this.setStorageProperty("disabled", value);
1025
- }
1026
- /**
1027
- * Whether is hidden. If the activity is not started yet, it will be hidden.
1028
- */
1029
- get hidden() {
1030
- if (this.fromDay && this.fromDay > TimeManager.currentDay) {
1031
- return true;
1032
- }
1033
- if (!TimeManager.nowIsBetween(this.fromHour, this.toHour)) {
1034
- return true;
1035
- }
1036
- if (!this.isExpired) {
1037
- return true;
1038
- }
1039
- let value = this.getStorageProperty("hidden") || this.defaultHidden;
1040
- if (typeof value === "string") {
1041
- return getFlag(value);
1042
- }
1043
- return value;
1044
- }
1045
- set hidden(value) {
1046
- this.setStorageProperty("hidden", value);
1047
- }
1048
- /**
1049
- * The function for rendering the icon of the activity.
1050
- */
1051
- get renderIcon() {
1052
- let render = this._renderIcon;
1053
- if (render === void 0) {
1054
- return void 0;
1055
- }
1056
- if (typeof render === "function") {
1057
- return (props) => {
1058
- return render(this, props);
1059
- };
1060
- }
1061
- return (props) => render;
1062
- }
1063
- /**
1064
- * The function that is called when the activity is runned.
1065
- */
1066
- get onRun() {
1067
- return (props) => {
1068
- return this._onRun(this, props);
1069
- };
1070
- }
1071
- /**
1072
- * Whether the activity is a deadline.
1073
- * @returns Whether the activity is a deadline.
1074
- */
1075
- isExpired() {
1076
- if (this.toDay && this.toDay <= TimeManager.currentDay) {
1077
- return true;
1078
- }
1079
- return false;
1080
- }
1081
- /**
1082
- * Export the activity properties.
1083
- * @returns The activity properties.
1084
- */
1085
- export() {
1086
- return {
1087
- name: this.getStorageProperty("name") || this.defaultName,
1088
- fromHour: this.getStorageProperty("fromHour") || this.defaultFromHour,
1089
- toHour: this.getStorageProperty("toHour") || this.defaultToHour,
1090
- fromDay: this.getStorageProperty("fromDay") || this.defaultFromDay,
1091
- toDay: this.getStorageProperty("toDay") || this.defaultToDay,
1092
- disabled: this.getStorageProperty("disabled") || this.defaultDisabled,
1093
- hidden: this.getStorageProperty("hidden") || this.defaultHidden,
1094
- renderIcon: this._renderIcon
1095
- };
1096
- }
1097
- };
1098
-
1099
- // src/classes/navigation/ActivityRoom.ts
1100
- var ActivityRoom = class extends ActivityStoredAbstract {
1101
- constructor(id, room, onRun, props) {
1102
- super(onRun, props);
1103
- this._id = id;
1104
- this._room = room;
1105
- }
1106
- setStorageProperty(_, __) {
1107
- this._room.setActivity(this);
1108
- }
1109
- getStorageProperty(propertyName) {
1110
- let activity = this._room.getActivityMemory(this.id);
1111
- if (!activity || !activity.hasOwnProperty(propertyName)) {
1112
- return void 0;
1113
- }
1114
- return activity[propertyName];
1115
- }
1116
- get id() {
1117
- return this._id;
1118
- }
1119
- get room() {
1120
- return this._room;
1121
- }
1122
- export() {
1123
- let result = {};
1124
- if (this.name !== void 0) {
1125
- result["name"] = this.name;
1126
- }
1127
- if (this.fromHour !== void 0) {
1128
- result["fromHour"] = this.fromHour;
1129
- }
1130
- if (this.toHour !== void 0) {
1131
- result["toHour"] = this.toHour;
1132
- }
1133
- if (this.fromDay !== void 0) {
1134
- result["fromDay"] = this.fromDay;
1135
- }
1136
- if (this.toDay !== void 0) {
1137
- result["toDay"] = this.toDay;
1138
- }
1139
- if (this.disabled !== void 0) {
1140
- result["disabled"] = this.disabled;
1141
- }
1142
- return result;
1143
- }
1144
- };
1145
-
1146
- // src/classes/navigation/Room.ts
1147
- var ROOM_CATEGORY = "__nqtr-room__";
1148
- var RoomBaseModel = class extends StoredClassModel {
1149
- /**
1150
- * @param id The id of the room, it must be unique.
1151
- * @param location The location where the room is.
1152
- * @param props The properties of the room.
1153
- */
1154
- constructor(id, location, props = {}) {
1155
- var _a;
1156
- super(ROOM_CATEGORY, id);
1157
- this._location = location;
1158
- this.defaultName = props.name || "";
1159
- this._renderImage = props.renderImage;
1160
- this.defaultActivityIds = ((_a = props.defaultActivities) == null ? void 0 : _a.map((activity) => activity.id)) || [];
1161
- this.defaultDisabled = props.disabled || false;
1162
- this.defaultHidden = props.hidden || false;
1163
- this._renderIcon = props.renderIcon;
1164
- this._isEntrance = props.isEntrance;
1165
- }
1166
- /**
1167
- * The location where the room is.
1168
- */
1169
- get location() {
1170
- return this._location;
1171
- }
1172
- /**
1173
- * Whether is an entrance room, so when the player enters in the location, it will be the first room to be shown.
1174
- */
1175
- get isEntrance() {
1176
- return this._isEntrance || false;
1203
+ get isEntrance() {
1204
+ return this._isEntrance || false;
1177
1205
  }
1178
1206
  /**
1179
1207
  * The name.
@@ -1375,51 +1403,82 @@ var RoomBaseModel = class extends StoredClassModel {
1375
1403
  * @returns The character commitments of the room.
1376
1404
  */
1377
1405
  getRoutine() {
1378
- let commitments = getCurrentCommitments();
1406
+ let commitments = getCurrentRoutine();
1379
1407
  return commitments.filter((c) => c.room.id === this.id);
1380
1408
  }
1381
1409
  };
1382
-
1383
- // src/classes/quest/Goal.ts
1384
- var Goal = class {
1385
- constructor(props) {
1410
+ var GOAL_CATEGORY = "__nqtr-goal__";
1411
+ var Goal = class extends StoredClassModel {
1412
+ constructor(id, props) {
1413
+ super(GOAL_CATEGORY, id);
1386
1414
  this._description = props.description;
1387
- this.need = props.need || 1;
1388
- this.have = props.have || 0;
1415
+ this._need = props.need || 1;
1416
+ this._defaultHave = props.have || 0;
1389
1417
  }
1418
+ /**
1419
+ * The description of the goal.
1420
+ */
1390
1421
  get description() {
1391
1422
  return this._description;
1392
1423
  }
1393
- get isComplete() {
1424
+ get need() {
1425
+ return this._need;
1426
+ }
1427
+ get defaultHave() {
1428
+ return this._defaultHave;
1429
+ }
1430
+ };
1431
+ var GoalStage = class extends Goal {
1432
+ constructor(id, stageId, props) {
1433
+ super(id, props);
1434
+ this._stageId = stageId;
1435
+ }
1436
+ get stageId() {
1437
+ return this._stageId;
1438
+ }
1439
+ set stageId(value) {
1440
+ this._stageId = value;
1441
+ }
1442
+ get have() {
1443
+ return this.getStorageProperty("have-" + this._stageId) || this.defaultHave;
1444
+ }
1445
+ set have(value) {
1446
+ if (!this._stageId) {
1447
+ console.error(`[NQTR] The stage id is not set for the goal ${this.id}, so the have value can't be set.`);
1448
+ return;
1449
+ }
1450
+ this.setStorageProperty("have-" + this._stageId, value);
1451
+ }
1452
+ get completed() {
1394
1453
  return this.have >= this.need;
1395
1454
  }
1396
- setComplete() {
1397
- this.have = this.need;
1455
+ set completed(value) {
1456
+ if (value) {
1457
+ this.have = this.need;
1458
+ } else {
1459
+ console.warn(`[NQTR] The goal can't be set as not completed. You must edit the have value manually.`);
1460
+ }
1398
1461
  }
1399
1462
  find() {
1400
1463
  this.have++;
1401
1464
  }
1402
- get export() {
1403
- return {
1404
- description: this.description,
1405
- need: this.need,
1406
- have: this.have
1407
- };
1408
- }
1409
1465
  };
1410
- var QUEST_CATEGORY = "__nqtr-quest__";
1411
- var QuestBaseModel = class extends StoredClassModel {
1412
- constructor(id, stages, props) {
1413
- super(QUEST_CATEGORY, id);
1414
- this._stages = stages;
1466
+ var STAGE_CATEGORY = "__nqtr-stage__";
1467
+ var Stage = class extends StoredClassModel {
1468
+ constructor(id, props) {
1469
+ super(STAGE_CATEGORY, id);
1415
1470
  this._name = props.name || "";
1471
+ this._defaultGoals = props.goals || [];
1472
+ this._flags = props.flags || [];
1416
1473
  this._description = props.description || "";
1417
- this._icon = props.icon || "";
1418
- this._image = props.image || "";
1419
- this._isInDevelopment = props.isInDevelopment || false;
1420
- }
1421
- get stages() {
1422
- return this._stages;
1474
+ this._adviceDescription = props.adviceDescription || "";
1475
+ this._renderImage = props.renderImage;
1476
+ this._daysRequiredToStart = props.daysRequiredToStart;
1477
+ this._flagsRequiredToStart = props.flagsRequired || [];
1478
+ this._questsRequiredToStart = props.questsRequired || [];
1479
+ this._requestDescriptionToStart = props.requestDescription || "";
1480
+ this._onStart = props.onStart;
1481
+ this._onEnd = props.onEnd;
1423
1482
  }
1424
1483
  get name() {
1425
1484
  return this._name;
@@ -1427,50 +1486,138 @@ var QuestBaseModel = class extends StoredClassModel {
1427
1486
  get description() {
1428
1487
  return this._description;
1429
1488
  }
1430
- get icon() {
1431
- return this._icon;
1489
+ get adviceDescription() {
1490
+ return this._adviceDescription;
1432
1491
  }
1433
- get image() {
1434
- return this._image;
1492
+ /**
1493
+ * The function for rendering the image of the stage.
1494
+ */
1495
+ get renderImage() {
1496
+ let render = this._renderImage;
1497
+ if (render === void 0) {
1498
+ return void 0;
1499
+ }
1500
+ if (typeof render === "function") {
1501
+ return (props) => {
1502
+ return render(this, props);
1503
+ };
1504
+ }
1505
+ return (props) => render;
1435
1506
  }
1436
- get isInDevelopment() {
1437
- return this._isInDevelopment;
1507
+ get defaultGoals() {
1508
+ return this._defaultGoals;
1509
+ }
1510
+ /**
1511
+ * The list of flags that the player must complete to finish the stage.
1512
+ */
1513
+ get flags() {
1514
+ return this._flags;
1515
+ }
1516
+ get daysRequiredToStart() {
1517
+ return this._daysRequiredToStart || 0;
1518
+ }
1519
+ get flagsRequiredToStart() {
1520
+ return this._flagsRequiredToStart;
1521
+ }
1522
+ get questsRequiredToStart() {
1523
+ return this._questsRequiredToStart || [];
1524
+ }
1525
+ get requestDescriptionToStart() {
1526
+ return this._requestDescriptionToStart;
1527
+ }
1528
+ get onStart() {
1529
+ return this._onStart;
1530
+ }
1531
+ get onEnd() {
1532
+ return this._onEnd;
1438
1533
  }
1439
1534
  };
1440
- var STAGE_CATEGORY = "__nqtr-stage__";
1441
- var StageBaseModel = class extends StoredClassModel {
1535
+ var StageQuest = class extends Stage {
1442
1536
  constructor(id, props) {
1443
- super(STAGE_CATEGORY, id);
1444
- this._completed = false;
1445
- this._active = false;
1446
- this.defaultGoals = [];
1447
- this._name = props.name || "";
1448
- this._description = props.description || "";
1449
- this._adviceDescription = props.adviceDescription || "";
1450
- this._image = props.image || "";
1451
- this._daysRequiredToStart = props.daysRequiredToStart;
1452
- this._flagsRequired = props.flagsRequired;
1453
- this._questsRequired = props.questsRequired;
1454
- this._requestDescription = props.requestDescription || "";
1455
- this._onStart = props.onStart;
1456
- this._onEnd = props.onEnd;
1537
+ super(id, props);
1457
1538
  }
1458
1539
  get completed() {
1459
- return this._completed;
1540
+ let storedCompleted = this.getStorageProperty("completed");
1541
+ if (storedCompleted) {
1542
+ return storedCompleted;
1543
+ }
1544
+ if (!this.flags.every((flag) => getFlag(flag.flag))) {
1545
+ return false;
1546
+ }
1547
+ if (!this.goals.every((goal) => goal.completed)) {
1548
+ return false;
1549
+ }
1550
+ return true;
1460
1551
  }
1461
- get active() {
1462
- return this._active;
1552
+ set completed(value) {
1553
+ this.setStorageProperty("completed", value);
1463
1554
  }
1555
+ /**
1556
+ * The list of goals that the player needs to complete to finish the stage.
1557
+ */
1464
1558
  get goals() {
1465
- let list = this.getStorageProperty("goals");
1466
- if (!list) {
1467
- return this.defaultGoals;
1559
+ return this.defaultGoals.map((goal) => {
1560
+ return new GoalStage(goal.id, this.id, goal);
1561
+ });
1562
+ }
1563
+ get prevStageEndDay() {
1564
+ return this.getStorageProperty("prevStageEndDay");
1565
+ }
1566
+ set prevStageEndDay(value) {
1567
+ this.setStorageProperty("prevStageEndDay", value);
1568
+ }
1569
+ get startDay() {
1570
+ let prevStageEndDay = this.prevStageEndDay;
1571
+ if (prevStageEndDay === void 0) {
1572
+ return void 0;
1468
1573
  }
1469
- return list.map((goal) => new Goal(goal));
1574
+ return prevStageEndDay + this.daysRequiredToStart;
1470
1575
  }
1471
- set goals(value) {
1472
- let list = value.map((goal) => goal.export);
1473
- this.setStorageProperty("goals", list);
1576
+ get canStart() {
1577
+ let daysRequired = this.daysRequiredToStart;
1578
+ if (daysRequired > 0) {
1579
+ let prevStageEndDay = this.prevStageEndDay;
1580
+ if (prevStageEndDay === void 0) {
1581
+ return false;
1582
+ }
1583
+ if (prevStageEndDay + daysRequired > TimeManager.currentDay) {
1584
+ return false;
1585
+ }
1586
+ }
1587
+ if (this.flagsRequiredToStart.length > 0 && !this.flagsRequiredToStart.every((flag) => getFlag(flag.flag))) {
1588
+ return false;
1589
+ }
1590
+ if (this.questsRequiredToStart.length > 0 && !this.questsRequiredToStart.every(
1591
+ (q) => q.quest.currentStageIndex && q.quest.currentStageIndex >= q.stageNumber
1592
+ )) {
1593
+ return false;
1594
+ }
1595
+ return true;
1596
+ }
1597
+ get onStart() {
1598
+ if (this.daysRequiredToStart > 0) {
1599
+ this.prevStageEndDay = TimeManager.currentDay;
1600
+ }
1601
+ return super.onStart;
1602
+ }
1603
+ };
1604
+
1605
+ // src/classes/quest/Quest.ts
1606
+ var QUEST_CATEGORY = "__nqtr-quest__";
1607
+ var Quest = class extends StoredClassModel {
1608
+ constructor(id, stages, props) {
1609
+ super(QUEST_CATEGORY, id);
1610
+ this._stages = stages;
1611
+ this._name = props.name || "";
1612
+ this._description = props.description || "";
1613
+ this._renderIcon = props.renderIcon;
1614
+ this._renderImage = props.renderImage;
1615
+ this._isInDevelopment = props.isInDevelopment || false;
1616
+ }
1617
+ get stages() {
1618
+ return this._stages.map((stage, index) => {
1619
+ return new StageQuest(stage.id, stage);
1620
+ });
1474
1621
  }
1475
1622
  get name() {
1476
1623
  return this._name;
@@ -1478,29 +1625,99 @@ var StageBaseModel = class extends StoredClassModel {
1478
1625
  get description() {
1479
1626
  return this._description;
1480
1627
  }
1481
- get adviceDescription() {
1482
- return this._adviceDescription;
1628
+ /**
1629
+ * The function for rendering the icon of the quest.
1630
+ */
1631
+ get renderIcon() {
1632
+ let render = this._renderIcon;
1633
+ if (render === void 0) {
1634
+ return void 0;
1635
+ }
1636
+ if (typeof render === "function") {
1637
+ return (props) => {
1638
+ return render(this, props);
1639
+ };
1640
+ }
1641
+ return (props) => render;
1642
+ }
1643
+ /**
1644
+ * The function for rendering the image of the quest.
1645
+ */
1646
+ get renderImage() {
1647
+ let render = this._renderImage;
1648
+ if (render === void 0) {
1649
+ return void 0;
1650
+ }
1651
+ if (typeof render === "function") {
1652
+ return (props) => {
1653
+ return render(this, props);
1654
+ };
1655
+ }
1656
+ return (props) => render;
1483
1657
  }
1484
- get image() {
1485
- return this._image;
1658
+ get isInDevelopment() {
1659
+ return this._isInDevelopment;
1486
1660
  }
1487
- get daysRequiredToStart() {
1488
- return this._daysRequiredToStart;
1661
+ get currentStageIndex() {
1662
+ return this.getStorageProperty("currentStageIndex");
1663
+ }
1664
+ set currentStageIndex(value) {
1665
+ this.setStorageProperty("currentStageIndex", value);
1489
1666
  }
1490
- get flagsRequired() {
1491
- return this._flagsRequired;
1667
+ get currentStage() {
1668
+ let index = this.currentStageIndex;
1669
+ if (index === void 0 || index >= this.stages.length) {
1670
+ return void 0;
1671
+ }
1672
+ return this.stages[index];
1492
1673
  }
1493
- get questsRequired() {
1494
- return this._questsRequired;
1674
+ get started() {
1675
+ return this.currentStageIndex !== void 0;
1495
1676
  }
1496
- get requestDescription() {
1497
- return this._requestDescription;
1677
+ get completed() {
1678
+ return this.currentStageIndex === this.stages.length;
1498
1679
  }
1499
- get onStart() {
1500
- return this._onStart;
1680
+ start() {
1681
+ if (this.started) {
1682
+ console.warn(`[NQTR] Quest ${this.id} is already started`);
1683
+ return;
1684
+ }
1685
+ if (this.stages.length === 0) {
1686
+ console.error(`[NQTR] Quest ${this.id} has no stages`);
1687
+ return;
1688
+ }
1689
+ this.currentStageIndex = 0;
1690
+ let currentStage = this.currentStage;
1691
+ if (currentStage && currentStage.onStart) {
1692
+ return currentStage.onStart();
1693
+ } else {
1694
+ console.error(`[NQTR] Quest ${this.id} has no start stage`);
1695
+ }
1501
1696
  }
1502
- get onEnd() {
1503
- return this._onEnd;
1697
+ tryToGoNextStage() {
1698
+ if (!this.started) {
1699
+ return;
1700
+ }
1701
+ if (this.completed) {
1702
+ return;
1703
+ }
1704
+ let currentStage = this.currentStage;
1705
+ let currentStageIndex = this.currentStageIndex;
1706
+ if (!currentStage || currentStageIndex === void 0) {
1707
+ console.error(`[NQTR] Quest ${this.id} has no current stage`);
1708
+ return;
1709
+ }
1710
+ if (currentStage.completed) {
1711
+ let nextStageIndex = currentStageIndex + 1;
1712
+ currentStageIndex = nextStageIndex;
1713
+ let nextStage = this.currentStage;
1714
+ if (currentStage && currentStage.onEnd) {
1715
+ currentStage.onEnd();
1716
+ }
1717
+ if (nextStage && nextStage.onStart) {
1718
+ return nextStage.onStart();
1719
+ }
1720
+ }
1504
1721
  }
1505
1722
  };
1506
1723
  var CURRENT_ROOM_MEMORY_KEY = "___nqtr-current_room_memory___";
@@ -1563,6 +1780,6 @@ function currentActivities() {
1563
1780
  return currentRoom.activities.filter((activity) => !activity.hidden);
1564
1781
  }
1565
1782
 
1566
- export { ActivityModel, CommitmentBaseModel, ExecutionTypeEnum, Goal, LocationBaseModel, MapBaseModel, QuestBaseModel, RoomBaseModel, StageBaseModel, TimeManager, addTemporaryCommitment, clearExpiredActivities, clearExpiredRoutine, currentActivities, getActivityById, getAllLocations, getAllMaps, getCommitmentByCharacter, getCommitmentById, getCueerntMap, getCurrenrLocation, getCurrentCommitments, getCurrentRoom, getFixedCommitments, getRoomById, getTemporaryCommitments, saveActivity, saveCommitment, saveRoom, setCurrentRoom, setFixedCommitments };
1783
+ export { ActivityModel, ActivityRoom, CommitmentBaseModel, Goal, LocationBaseModel, MapBaseModel, Quest, RoomBaseModel, Stage, TimeManager, addCommitment, clearExpiredActivities, clearExpiredRoutine, currentActivities, getActivityById, getAllLocations, getAllMaps, getCommitmentByCharacter, getCommitmentById, getCueerntMap, getCurrenrLocation, getCurrentRoom, getCurrentRoutine, getQuestById, getRoomById, saveActivity, saveCommitment, saveQuest, saveRoom, setCurrentRoom, setFixedRoutine };
1567
1784
  //# sourceMappingURL=out.js.map
1568
1785
  //# sourceMappingURL=index.mjs.map