@drincs/nqtr 0.2.0 → 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.
Files changed (117) hide show
  1. package/dist/{StageProps-xLLR0rjD.d.mts → StageProps-D002cyay.d.mts} +109 -2
  2. package/dist/{StageProps-DCZkZHwZ.d.ts → StageProps-DleWO-vf.d.ts} +109 -2
  3. package/dist/classes/Commitment.d.mts +2 -2
  4. package/dist/classes/Commitment.d.ts +2 -2
  5. package/dist/classes/index.d.mts +4 -4
  6. package/dist/classes/index.d.ts +4 -4
  7. package/dist/classes/index.js +38 -131
  8. package/dist/classes/index.js.map +1 -1
  9. package/dist/classes/index.mjs +40 -132
  10. package/dist/classes/index.mjs.map +1 -1
  11. package/dist/classes/navigation/ActivityRoom.d.mts +2 -2
  12. package/dist/classes/navigation/ActivityRoom.d.ts +2 -2
  13. package/dist/classes/navigation/Location.d.mts +3 -3
  14. package/dist/classes/navigation/Location.d.ts +3 -3
  15. package/dist/classes/navigation/Map.d.mts +3 -3
  16. package/dist/classes/navigation/Map.d.ts +3 -3
  17. package/dist/classes/navigation/Room.d.mts +1 -1
  18. package/dist/classes/navigation/Room.d.ts +1 -1
  19. package/dist/classes/navigation/Room.js +43 -43
  20. package/dist/classes/navigation/Room.js.map +1 -1
  21. package/dist/classes/navigation/Room.mjs +43 -43
  22. package/dist/classes/navigation/Room.mjs.map +1 -1
  23. package/dist/classes/quest/Goal.d.mts +18 -0
  24. package/dist/classes/quest/Goal.d.ts +18 -0
  25. package/dist/classes/quest/Goal.js +18 -0
  26. package/dist/classes/quest/Goal.js.map +1 -1
  27. package/dist/classes/quest/Goal.mjs +18 -0
  28. package/dist/classes/quest/Goal.mjs.map +1 -1
  29. package/dist/classes/quest/Quest.d.mts +1 -1
  30. package/dist/classes/quest/Quest.d.ts +1 -1
  31. package/dist/classes/quest/Quest.js +206 -25
  32. package/dist/classes/quest/Quest.js.map +1 -1
  33. package/dist/classes/quest/Quest.mjs +206 -25
  34. package/dist/classes/quest/Quest.mjs.map +1 -1
  35. package/dist/classes/quest/Stage.d.mts +1 -1
  36. package/dist/classes/quest/Stage.d.ts +1 -1
  37. package/dist/classes/quest/Stage.js +95 -8
  38. package/dist/classes/quest/Stage.js.map +1 -1
  39. package/dist/classes/quest/Stage.mjs +95 -8
  40. package/dist/classes/quest/Stage.mjs.map +1 -1
  41. package/dist/decorators/ActivityDecorator.d.mts +10 -11
  42. package/dist/decorators/ActivityDecorator.d.ts +10 -11
  43. package/dist/decorators/ActivityDecorator.js +384 -9
  44. package/dist/decorators/ActivityDecorator.js.map +1 -1
  45. package/dist/decorators/ActivityDecorator.mjs +384 -9
  46. package/dist/decorators/ActivityDecorator.mjs.map +1 -1
  47. package/dist/decorators/CommitmentDecorator.d.mts +3 -3
  48. package/dist/decorators/CommitmentDecorator.d.ts +3 -3
  49. package/dist/decorators/CommitmentDecorator.js +1 -1
  50. package/dist/decorators/CommitmentDecorator.js.map +1 -1
  51. package/dist/decorators/CommitmentDecorator.mjs +1 -1
  52. package/dist/decorators/CommitmentDecorator.mjs.map +1 -1
  53. package/dist/decorators/QuestDecorator.d.mts +4 -3
  54. package/dist/decorators/QuestDecorator.d.ts +4 -3
  55. package/dist/decorators/QuestDecorator.js +206 -25
  56. package/dist/decorators/QuestDecorator.js.map +1 -1
  57. package/dist/decorators/QuestDecorator.mjs +206 -25
  58. package/dist/decorators/QuestDecorator.mjs.map +1 -1
  59. package/dist/decorators/RoomDecorator.d.mts +3 -3
  60. package/dist/decorators/RoomDecorator.d.ts +3 -3
  61. package/dist/decorators/index.d.mts +3 -3
  62. package/dist/decorators/index.d.ts +3 -3
  63. package/dist/decorators/index.js +427 -115
  64. package/dist/decorators/index.js.map +1 -1
  65. package/dist/decorators/index.mjs +428 -116
  66. package/dist/decorators/index.mjs.map +1 -1
  67. package/dist/functions/ActivityFunctions.d.mts +3 -3
  68. package/dist/functions/ActivityFunctions.d.ts +3 -3
  69. package/dist/functions/ActivityFunctions.js.map +1 -1
  70. package/dist/functions/ActivityFunctions.mjs.map +1 -1
  71. package/dist/functions/NavigationFunctions.d.mts +3 -3
  72. package/dist/functions/NavigationFunctions.d.ts +3 -3
  73. package/dist/functions/NavigationFunctions.js.map +1 -1
  74. package/dist/functions/NavigationFunctions.mjs.map +1 -1
  75. package/dist/functions/QuestFunctions.d.mts +8 -0
  76. package/dist/functions/QuestFunctions.d.ts +8 -0
  77. package/dist/functions/QuestFunctions.js +21 -0
  78. package/dist/functions/QuestFunctions.js.map +1 -0
  79. package/dist/functions/QuestFunctions.mjs +19 -0
  80. package/dist/functions/QuestFunctions.mjs.map +1 -0
  81. package/dist/functions/RoutineFunctions.d.mts +3 -3
  82. package/dist/functions/RoutineFunctions.d.ts +3 -3
  83. package/dist/functions/RoutineFunctions.js.map +1 -1
  84. package/dist/functions/RoutineFunctions.mjs.map +1 -1
  85. package/dist/functions/index.d.mts +4 -3
  86. package/dist/functions/index.d.ts +4 -3
  87. package/dist/functions/index.js +13 -0
  88. package/dist/functions/index.js.map +1 -1
  89. package/dist/functions/index.mjs +13 -1
  90. package/dist/functions/index.mjs.map +1 -1
  91. package/dist/index.d.mts +6 -5
  92. package/dist/index.d.ts +6 -5
  93. package/dist/index.js +354 -166
  94. package/dist/index.js.map +1 -1
  95. package/dist/index.mjs +354 -166
  96. package/dist/index.mjs.map +1 -1
  97. package/dist/interface/CommitmentProps.d.mts +2 -2
  98. package/dist/interface/CommitmentProps.d.ts +2 -2
  99. package/dist/interface/RoomProps.d.mts +2 -2
  100. package/dist/interface/RoomProps.d.ts +2 -2
  101. package/dist/interface/index.d.mts +3 -3
  102. package/dist/interface/index.d.ts +3 -3
  103. package/dist/interface/navigation/LocationProps.d.mts +3 -3
  104. package/dist/interface/navigation/LocationProps.d.ts +3 -3
  105. package/dist/interface/navigation/MapProps.d.mts +3 -3
  106. package/dist/interface/navigation/MapProps.d.ts +3 -3
  107. package/dist/interface/quest/QuestProps.d.mts +1 -1
  108. package/dist/interface/quest/QuestProps.d.ts +1 -1
  109. package/dist/interface/quest/StageProps.d.mts +1 -1
  110. package/dist/interface/quest/StageProps.d.ts +1 -1
  111. package/dist/types/QuestsRequired.d.mts +1 -1
  112. package/dist/types/QuestsRequired.d.ts +1 -1
  113. package/dist/types/index.d.mts +1 -1
  114. package/dist/types/index.d.ts +1 -1
  115. package/package.json +1 -1
  116. package/dist/{Commitment-BJTIpBQ5.d.ts → Commitment-D3LPSbFX.d.ts} +2 -2
  117. package/dist/{Commitment-CtNWnNQX.d.mts → Commitment-Eox2652k.d.mts} +2 -2
@@ -6,10 +6,19 @@ import StageFlags from './interface/quest/StageFlags.mjs';
6
6
  declare class Stage extends StoredClassModel implements StageProps {
7
7
  constructor(id: string, props: StageProps);
8
8
  private _name;
9
+ /**
10
+ * The name of the stage.
11
+ */
9
12
  get name(): string;
10
13
  private _description;
14
+ /**
15
+ * The description of the stage.
16
+ */
11
17
  get description(): string;
12
18
  private _adviceDescription;
19
+ /**
20
+ * The advice description of the stage.
21
+ */
13
22
  get adviceDescription(): string;
14
23
  private _renderImage?;
15
24
  /**
@@ -17,6 +26,10 @@ declare class Stage extends StoredClassModel implements StageProps {
17
26
  */
18
27
  get renderImage(): ((props: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
19
28
  private _defaultGoals;
29
+ /**
30
+ * The list of goals that the player needs to complete to finish the stage.
31
+ * This is the list set by the developer. if you want to get the current goals, use the goals property.
32
+ */
20
33
  get defaultGoals(): Goal[];
21
34
  private _flags;
22
35
  /**
@@ -24,40 +37,89 @@ declare class Stage extends StoredClassModel implements StageProps {
24
37
  */
25
38
  get flags(): StageFlags[];
26
39
  private _daysRequiredToStart?;
40
+ /**
41
+ * The number of days required to start the stage.
42
+ */
27
43
  get daysRequiredToStart(): number;
28
44
  private _flagsRequiredToStart;
45
+ /**
46
+ * The list of flags required to start the stage.
47
+ */
29
48
  get flagsRequiredToStart(): StageFlags[];
30
49
  private _questsRequiredToStart;
50
+ /**
51
+ * The list of quests required to start the stage.
52
+ */
31
53
  get questsRequiredToStart(): QuestsRequiredType[];
32
54
  private _requestDescriptionToStart;
55
+ /**
56
+ * The description of the request to start the stage.
57
+ */
33
58
  get requestDescriptionToStart(): string;
34
59
  private _onStart?;
60
+ /**
61
+ * The function that will be called when the stage starts.
62
+ */
35
63
  get onStart(): undefined | ((props: OnStartStage) => void);
36
64
  private _onEnd?;
65
+ /**
66
+ * The function that will be called when the stage ends.
67
+ */
37
68
  get onEnd(): undefined | ((props: OnEndStage) => void);
38
69
  }
39
70
  declare class StageQuest extends Stage {
40
71
  constructor(id: string, props: StageProps);
72
+ /**
73
+ * Check if the flag and goals are completed.
74
+ * You can force the completion of the stage by setting the completed property to true.
75
+ */
41
76
  get completed(): boolean;
42
77
  set completed(value: boolean);
78
+ /**
79
+ * If the stage is started.
80
+ */
81
+ get started(): boolean;
82
+ set started(value: boolean);
43
83
  /**
44
84
  * The list of goals that the player needs to complete to finish the stage.
45
85
  */
46
86
  get goals(): GoalStage[];
47
87
  private get prevStageEndDay();
48
88
  private set prevStageEndDay(value);
89
+ /**
90
+ * The day when the stage starts.
91
+ */
49
92
  get startDay(): number | undefined;
93
+ /**
94
+ * Check if the stage can start.
95
+ */
50
96
  get canStart(): boolean;
51
- get onStart(): undefined | ((props: OnStartStage) => void);
97
+ /**
98
+ * Inizialize the stage. **This function should be called only by the Quest class.**
99
+ */
100
+ inizialize(): void;
101
+ /**
102
+ * The function that will be called when the stage starts.
103
+ */
104
+ start(props: OnStartStage): void;
52
105
  }
53
106
 
54
107
  declare class Quest extends StoredClassModel {
55
108
  constructor(id: string, stages: Stage[], props: QuestProps);
56
109
  private _stages;
110
+ /**
111
+ * The stages of the quest.
112
+ */
57
113
  get stages(): StageQuest[];
58
114
  private _name;
115
+ /**
116
+ * The name of the quest.
117
+ */
59
118
  get name(): string;
60
119
  private _description;
120
+ /**
121
+ * The description of the quest.
122
+ */
61
123
  get description(): string;
62
124
  private _renderIcon?;
63
125
  /**
@@ -70,14 +132,59 @@ declare class Quest extends StoredClassModel {
70
132
  */
71
133
  get renderImage(): ((props: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
72
134
  private _isInDevelopment;
135
+ /**
136
+ * If the quest is in development.
137
+ */
73
138
  get isInDevelopment(): boolean;
139
+ /**
140
+ * The index of the current stage.
141
+ */
74
142
  get currentStageIndex(): number | undefined;
75
143
  private set currentStageIndex(value);
144
+ /**
145
+ * The current stage.
146
+ */
76
147
  get currentStage(): StageQuest | undefined;
148
+ /**
149
+ * If the quest is started.
150
+ */
77
151
  get started(): boolean;
152
+ /**
153
+ * If the quest is completed.
154
+ */
78
155
  get completed(): boolean;
156
+ /**
157
+ * Start the quest.
158
+ * @param props The properties for the start stage. If you not want to pass any property, you can pass an {}.
159
+ * @returns
160
+ */
79
161
  start(props: OnStartStage): void;
80
- tryToGoNextStage(startProps: OnStartStage, endProps: OnEndStage): void;
162
+ /**
163
+ * Go to the next stage if the current stage is completed.
164
+ * If you want to force the change of stage, use goNextStage.
165
+ * @param startProps The properties for the start stage. If you not want to pass any property, you can pass an {}.
166
+ * @param endProps The properties for the end stage. If you not want to pass any property, you can pass an {}.
167
+ * @returns true if the stage was changed, false otherwise.
168
+ */
169
+ tryToGoNextStage(startProps: OnStartStage, endProps: OnEndStage): boolean;
170
+ /**
171
+ * Complete the current stage and go to the next stage.
172
+ * If you want to go to the next stage only if the current stage is completed, use tryToGoNextStage.
173
+ * @param startProps The properties for the start stage. If you not want to pass any property, you can pass an {}.
174
+ * @param endProps The properties for the end stage. If you not want to pass any property, you can pass an {}.
175
+ * @returns true if the stage was changed, false otherwise.
176
+ */
177
+ completeCurrentStageAndGoNext(startProps: OnStartStage, endProps: OnEndStage): boolean;
178
+ /**
179
+ * Go to the next stage without checking if the current stage is completed.
180
+ * If you want to go to the next stage only if the current stage is completed, use tryToGoNextStage.
181
+ * @param startProps
182
+ * @param endProps
183
+ * @returns returns true if the stage was changed, false otherwise.
184
+ */
185
+ goNextStage(startProps: OnStartStage, endProps: OnEndStage): boolean;
186
+ get currentStageMustStart(): boolean;
187
+ startCurrentStage(props: OnStartStage): void;
81
188
  }
82
189
 
83
190
  type QuestsRequiredType = {
@@ -6,10 +6,19 @@ import StageFlags from './interface/quest/StageFlags.js';
6
6
  declare class Stage extends StoredClassModel implements StageProps {
7
7
  constructor(id: string, props: StageProps);
8
8
  private _name;
9
+ /**
10
+ * The name of the stage.
11
+ */
9
12
  get name(): string;
10
13
  private _description;
14
+ /**
15
+ * The description of the stage.
16
+ */
11
17
  get description(): string;
12
18
  private _adviceDescription;
19
+ /**
20
+ * The advice description of the stage.
21
+ */
13
22
  get adviceDescription(): string;
14
23
  private _renderImage?;
15
24
  /**
@@ -17,6 +26,10 @@ declare class Stage extends StoredClassModel implements StageProps {
17
26
  */
18
27
  get renderImage(): ((props: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
19
28
  private _defaultGoals;
29
+ /**
30
+ * The list of goals that the player needs to complete to finish the stage.
31
+ * This is the list set by the developer. if you want to get the current goals, use the goals property.
32
+ */
20
33
  get defaultGoals(): Goal[];
21
34
  private _flags;
22
35
  /**
@@ -24,40 +37,89 @@ declare class Stage extends StoredClassModel implements StageProps {
24
37
  */
25
38
  get flags(): StageFlags[];
26
39
  private _daysRequiredToStart?;
40
+ /**
41
+ * The number of days required to start the stage.
42
+ */
27
43
  get daysRequiredToStart(): number;
28
44
  private _flagsRequiredToStart;
45
+ /**
46
+ * The list of flags required to start the stage.
47
+ */
29
48
  get flagsRequiredToStart(): StageFlags[];
30
49
  private _questsRequiredToStart;
50
+ /**
51
+ * The list of quests required to start the stage.
52
+ */
31
53
  get questsRequiredToStart(): QuestsRequiredType[];
32
54
  private _requestDescriptionToStart;
55
+ /**
56
+ * The description of the request to start the stage.
57
+ */
33
58
  get requestDescriptionToStart(): string;
34
59
  private _onStart?;
60
+ /**
61
+ * The function that will be called when the stage starts.
62
+ */
35
63
  get onStart(): undefined | ((props: OnStartStage) => void);
36
64
  private _onEnd?;
65
+ /**
66
+ * The function that will be called when the stage ends.
67
+ */
37
68
  get onEnd(): undefined | ((props: OnEndStage) => void);
38
69
  }
39
70
  declare class StageQuest extends Stage {
40
71
  constructor(id: string, props: StageProps);
72
+ /**
73
+ * Check if the flag and goals are completed.
74
+ * You can force the completion of the stage by setting the completed property to true.
75
+ */
41
76
  get completed(): boolean;
42
77
  set completed(value: boolean);
78
+ /**
79
+ * If the stage is started.
80
+ */
81
+ get started(): boolean;
82
+ set started(value: boolean);
43
83
  /**
44
84
  * The list of goals that the player needs to complete to finish the stage.
45
85
  */
46
86
  get goals(): GoalStage[];
47
87
  private get prevStageEndDay();
48
88
  private set prevStageEndDay(value);
89
+ /**
90
+ * The day when the stage starts.
91
+ */
49
92
  get startDay(): number | undefined;
93
+ /**
94
+ * Check if the stage can start.
95
+ */
50
96
  get canStart(): boolean;
51
- get onStart(): undefined | ((props: OnStartStage) => void);
97
+ /**
98
+ * Inizialize the stage. **This function should be called only by the Quest class.**
99
+ */
100
+ inizialize(): void;
101
+ /**
102
+ * The function that will be called when the stage starts.
103
+ */
104
+ start(props: OnStartStage): void;
52
105
  }
53
106
 
54
107
  declare class Quest extends StoredClassModel {
55
108
  constructor(id: string, stages: Stage[], props: QuestProps);
56
109
  private _stages;
110
+ /**
111
+ * The stages of the quest.
112
+ */
57
113
  get stages(): StageQuest[];
58
114
  private _name;
115
+ /**
116
+ * The name of the quest.
117
+ */
59
118
  get name(): string;
60
119
  private _description;
120
+ /**
121
+ * The description of the quest.
122
+ */
61
123
  get description(): string;
62
124
  private _renderIcon?;
63
125
  /**
@@ -70,14 +132,59 @@ declare class Quest extends StoredClassModel {
70
132
  */
71
133
  get renderImage(): ((props: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
72
134
  private _isInDevelopment;
135
+ /**
136
+ * If the quest is in development.
137
+ */
73
138
  get isInDevelopment(): boolean;
139
+ /**
140
+ * The index of the current stage.
141
+ */
74
142
  get currentStageIndex(): number | undefined;
75
143
  private set currentStageIndex(value);
144
+ /**
145
+ * The current stage.
146
+ */
76
147
  get currentStage(): StageQuest | undefined;
148
+ /**
149
+ * If the quest is started.
150
+ */
77
151
  get started(): boolean;
152
+ /**
153
+ * If the quest is completed.
154
+ */
78
155
  get completed(): boolean;
156
+ /**
157
+ * Start the quest.
158
+ * @param props The properties for the start stage. If you not want to pass any property, you can pass an {}.
159
+ * @returns
160
+ */
79
161
  start(props: OnStartStage): void;
80
- tryToGoNextStage(startProps: OnStartStage, endProps: OnEndStage): void;
162
+ /**
163
+ * Go to the next stage if the current stage is completed.
164
+ * If you want to force the change of stage, use goNextStage.
165
+ * @param startProps The properties for the start stage. If you not want to pass any property, you can pass an {}.
166
+ * @param endProps The properties for the end stage. If you not want to pass any property, you can pass an {}.
167
+ * @returns true if the stage was changed, false otherwise.
168
+ */
169
+ tryToGoNextStage(startProps: OnStartStage, endProps: OnEndStage): boolean;
170
+ /**
171
+ * Complete the current stage and go to the next stage.
172
+ * If you want to go to the next stage only if the current stage is completed, use tryToGoNextStage.
173
+ * @param startProps The properties for the start stage. If you not want to pass any property, you can pass an {}.
174
+ * @param endProps The properties for the end stage. If you not want to pass any property, you can pass an {}.
175
+ * @returns true if the stage was changed, false otherwise.
176
+ */
177
+ completeCurrentStageAndGoNext(startProps: OnStartStage, endProps: OnEndStage): boolean;
178
+ /**
179
+ * Go to the next stage without checking if the current stage is completed.
180
+ * If you want to go to the next stage only if the current stage is completed, use tryToGoNextStage.
181
+ * @param startProps
182
+ * @param endProps
183
+ * @returns returns true if the stage was changed, false otherwise.
184
+ */
185
+ goNextStage(startProps: OnStartStage, endProps: OnEndStage): boolean;
186
+ get currentStageMustStart(): boolean;
187
+ startCurrentStage(props: OnStartStage): void;
81
188
  }
82
189
 
83
190
  type QuestsRequiredType = {
@@ -1,8 +1,8 @@
1
1
  import '@drincs/nqtr/dist/override';
2
2
  import '@drincs/pixi-vn';
3
- export { C as default } from '../Commitment-CtNWnNQX.mjs';
3
+ export { C as default } from '../Commitment-Eox2652k.mjs';
4
4
  import '../types/ExecutionType.mjs';
5
- import './Activity.mjs';
6
5
  import '../ActivityProps-D45DQdcT.mjs';
7
6
  import '../types/OnRunActivityEvent.mjs';
7
+ import './Activity.mjs';
8
8
  import '../types/OnRunCommitmentEvent.mjs';
@@ -1,8 +1,8 @@
1
1
  import '@drincs/nqtr/dist/override';
2
2
  import '@drincs/pixi-vn';
3
- export { C as default } from '../Commitment-BJTIpBQ5.js';
3
+ export { C as default } from '../Commitment-D3LPSbFX.js';
4
4
  import '../types/ExecutionType.js';
5
- import './Activity.js';
6
5
  import '../ActivityProps-BkHX8xkA.js';
7
6
  import '../types/OnRunActivityEvent.js';
7
+ import './Activity.js';
8
8
  import '../types/OnRunCommitmentEvent.js';
@@ -1,11 +1,11 @@
1
- export { default as ActivityModel } from './Activity.mjs';
2
- export { A as ActivityRoom, C as CommitmentBaseModel, L as LocationBaseModel, M as MapBaseModel, R as RoomBaseModel } from '../Commitment-CtNWnNQX.mjs';
1
+ export { A as ActivityRoom, C as CommitmentBaseModel, L as LocationBaseModel, M as MapBaseModel, R as RoomBaseModel } from '../Commitment-Eox2652k.mjs';
3
2
  export { default as Goal } from './quest/Goal.mjs';
4
- export { S as Stage } from '../StageProps-xLLR0rjD.mjs';
3
+ export { S as Stage } from '../StageProps-D002cyay.mjs';
5
4
  import '@drincs/nqtr/dist/override';
5
+ import '@drincs/pixi-vn';
6
6
  import '../ActivityProps-D45DQdcT.mjs';
7
7
  import '../types/OnRunActivityEvent.mjs';
8
- import '@drincs/pixi-vn';
8
+ import './Activity.mjs';
9
9
  import '../types/ExecutionType.mjs';
10
10
  import '../types/OnRunCommitmentEvent.mjs';
11
11
  import '../interface/quest/GoalProps.mjs';
@@ -1,11 +1,11 @@
1
- export { default as ActivityModel } from './Activity.js';
2
- export { A as ActivityRoom, C as CommitmentBaseModel, L as LocationBaseModel, M as MapBaseModel, R as RoomBaseModel } from '../Commitment-BJTIpBQ5.js';
1
+ export { A as ActivityRoom, C as CommitmentBaseModel, L as LocationBaseModel, M as MapBaseModel, R as RoomBaseModel } from '../Commitment-D3LPSbFX.js';
3
2
  export { default as Goal } from './quest/Goal.js';
4
- export { S as Stage } from '../StageProps-DCZkZHwZ.js';
3
+ export { S as Stage } from '../StageProps-DleWO-vf.js';
5
4
  import '@drincs/nqtr/dist/override';
5
+ import '@drincs/pixi-vn';
6
6
  import '../ActivityProps-BkHX8xkA.js';
7
7
  import '../types/OnRunActivityEvent.js';
8
- import '@drincs/pixi-vn';
8
+ import './Activity.js';
9
9
  import '../types/ExecutionType.js';
10
10
  import '../types/OnRunCommitmentEvent.js';
11
11
  import '../interface/quest/GoalProps.js';
@@ -261,136 +261,7 @@ var TimeManager = class _TimeManager {
261
261
  }
262
262
  };
263
263
 
264
- // src/classes/Activity.ts
265
- var ActivityModel = class {
266
- /**
267
- * @param id The activity id, that must be unique.
268
- * @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.
269
- * @param props The activity properties.
270
- */
271
- constructor(id, onRun, props) {
272
- this._id = id;
273
- this._name = props.name;
274
- this._fromHour = props.fromHour;
275
- this._toHour = props.toHour;
276
- this._fromDay = props.fromDay;
277
- this._toDay = props.toDay;
278
- this._disabled = props.disabled || false;
279
- this._hidden = props.hidden || false;
280
- this._renderIcon = props.renderIcon;
281
- this._onRun = onRun;
282
- }
283
- /**
284
- * The activity id, that is unique.
285
- */
286
- get id() {
287
- return this._id;
288
- }
289
- /**
290
- * The name
291
- */
292
- get name() {
293
- return this._name;
294
- }
295
- /**
296
- * The hour when the activity starts. If the activity is not started yet, it will be hidden.
297
- */
298
- get fromHour() {
299
- return this._fromHour;
300
- }
301
- /**
302
- * The hour when the activity ends. If the activity is ended yet, it will be hidden.
303
- */
304
- get toHour() {
305
- return this._toHour;
306
- }
307
- /**
308
- * The day when the activity starts. If the activity is not started yet, it will be hidden.
309
- */
310
- get fromDay() {
311
- return this._fromDay;
312
- }
313
- /**
314
- * The day when the activity ends. If the activity is ended yet, it will be deleted or hidden.
315
- */
316
- get toDay() {
317
- return this._toDay;
318
- }
319
- /**
320
- * Whether is disabled.
321
- */
322
- get disabled() {
323
- if (typeof this._disabled === "string") {
324
- return pixiVn.getFlag(this._disabled);
325
- }
326
- return this._disabled;
327
- }
328
- /**
329
- * Whether is hidden. If the activity is not started yet, it will be hidden.
330
- */
331
- get hidden() {
332
- if (this.fromDay && this.fromDay > TimeManager.currentDay) {
333
- return true;
334
- }
335
- if (!this.isDeadline) {
336
- return true;
337
- }
338
- if (typeof this._hidden === "string") {
339
- return pixiVn.getFlag(this._hidden);
340
- }
341
- return this._hidden;
342
- }
343
- /**
344
- * The function for rendering the icon of the activity.
345
- */
346
- get renderIcon() {
347
- let render = this._renderIcon;
348
- if (render === void 0) {
349
- return void 0;
350
- }
351
- if (typeof render === "function") {
352
- return (props) => {
353
- return render(this, props);
354
- };
355
- }
356
- return (props) => render;
357
- }
358
- get _initialOnRun() {
359
- return this._onRun;
360
- }
361
- /**
362
- * The function that is called when the activity is runned.
363
- */
364
- get run() {
365
- return (props) => this._onRun(this, props);
366
- }
367
- /**
368
- * Whether the activity is a deadline.
369
- * @returns Whether the activity is a deadline.
370
- */
371
- isDeadline() {
372
- if (this.toDay && this.toDay <= TimeManager.currentDay) {
373
- return true;
374
- }
375
- return false;
376
- }
377
- /**
378
- * Export the activity properties.
379
- * @returns The activity properties.
380
- */
381
- export() {
382
- return {
383
- name: this._name,
384
- fromHour: this._fromHour,
385
- toHour: this._toHour,
386
- fromDay: this._fromDay,
387
- toDay: this._toDay,
388
- disabled: this._disabled,
389
- hidden: this._hidden,
390
- renderIcon: this._renderIcon
391
- };
392
- }
393
- };
264
+ // src/classes/Commitment.ts
394
265
  var COMMITMENT_CATEGORY = "__nqtr-commitment__";
395
266
  var CommitmentBaseModel = class extends pixiVn.StoredClassModel {
396
267
  /**
@@ -1037,9 +908,15 @@ var Goal = class extends pixiVn.StoredClassModel {
1037
908
  get description() {
1038
909
  return this._description;
1039
910
  }
911
+ /**
912
+ * The number of times the goal must be completed.
913
+ */
1040
914
  get need() {
1041
915
  return this._need;
1042
916
  }
917
+ /**
918
+ * The default number of times the goal has been completed.
919
+ */
1043
920
  get defaultHave() {
1044
921
  return this._defaultHave;
1045
922
  }
@@ -1063,12 +940,21 @@ var Stage = class extends pixiVn.StoredClassModel {
1063
940
  this._onStart = props.onStart;
1064
941
  this._onEnd = props.onEnd;
1065
942
  }
943
+ /**
944
+ * The name of the stage.
945
+ */
1066
946
  get name() {
1067
947
  return this._name;
1068
948
  }
949
+ /**
950
+ * The description of the stage.
951
+ */
1069
952
  get description() {
1070
953
  return this._description;
1071
954
  }
955
+ /**
956
+ * The advice description of the stage.
957
+ */
1072
958
  get adviceDescription() {
1073
959
  return this._adviceDescription;
1074
960
  }
@@ -1087,6 +973,10 @@ var Stage = class extends pixiVn.StoredClassModel {
1087
973
  }
1088
974
  return (props) => render;
1089
975
  }
976
+ /**
977
+ * The list of goals that the player needs to complete to finish the stage.
978
+ * This is the list set by the developer. if you want to get the current goals, use the goals property.
979
+ */
1090
980
  get defaultGoals() {
1091
981
  return this._defaultGoals;
1092
982
  }
@@ -1096,21 +986,39 @@ var Stage = class extends pixiVn.StoredClassModel {
1096
986
  get flags() {
1097
987
  return this._flags;
1098
988
  }
989
+ /**
990
+ * The number of days required to start the stage.
991
+ */
1099
992
  get daysRequiredToStart() {
1100
993
  return this._daysRequiredToStart || 0;
1101
994
  }
995
+ /**
996
+ * The list of flags required to start the stage.
997
+ */
1102
998
  get flagsRequiredToStart() {
1103
999
  return this._flagsRequiredToStart;
1104
1000
  }
1001
+ /**
1002
+ * The list of quests required to start the stage.
1003
+ */
1105
1004
  get questsRequiredToStart() {
1106
1005
  return this._questsRequiredToStart || [];
1107
1006
  }
1007
+ /**
1008
+ * The description of the request to start the stage.
1009
+ */
1108
1010
  get requestDescriptionToStart() {
1109
1011
  return this._requestDescriptionToStart;
1110
1012
  }
1013
+ /**
1014
+ * The function that will be called when the stage starts.
1015
+ */
1111
1016
  get onStart() {
1112
1017
  return this._onStart;
1113
1018
  }
1019
+ /**
1020
+ * The function that will be called when the stage ends.
1021
+ */
1114
1022
  get onEnd() {
1115
1023
  return this._onEnd;
1116
1024
  }
@@ -1387,7 +1295,6 @@ var RoomBaseModel = class extends pixiVn.StoredClassModel {
1387
1295
  }
1388
1296
  };
1389
1297
 
1390
- exports.ActivityModel = ActivityModel;
1391
1298
  exports.ActivityRoom = ActivityRoom;
1392
1299
  exports.CommitmentBaseModel = CommitmentBaseModel;
1393
1300
  exports.Goal = Goal;