@drincs/nqtr 0.2.0 → 0.2.1

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 (69) hide show
  1. package/dist/{StageProps-DCZkZHwZ.d.ts → StageProps-BFsiCaZT.d.ts} +80 -1
  2. package/dist/{StageProps-xLLR0rjD.d.mts → StageProps-CkXejAbn.d.mts} +80 -1
  3. package/dist/classes/index.d.mts +1 -1
  4. package/dist/classes/index.d.ts +1 -1
  5. package/dist/classes/index.js +37 -0
  6. package/dist/classes/index.js.map +1 -1
  7. package/dist/classes/index.mjs +37 -0
  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/Goal.d.mts +18 -0
  12. package/dist/classes/quest/Goal.d.ts +18 -0
  13. package/dist/classes/quest/Goal.js +18 -0
  14. package/dist/classes/quest/Goal.js.map +1 -1
  15. package/dist/classes/quest/Goal.mjs +18 -0
  16. package/dist/classes/quest/Goal.mjs.map +1 -1
  17. package/dist/classes/quest/Quest.d.mts +1 -1
  18. package/dist/classes/quest/Quest.d.ts +1 -1
  19. package/dist/classes/quest/Quest.js +103 -4
  20. package/dist/classes/quest/Quest.js.map +1 -1
  21. package/dist/classes/quest/Quest.mjs +103 -4
  22. package/dist/classes/quest/Quest.mjs.map +1 -1
  23. package/dist/classes/quest/Stage.d.mts +1 -1
  24. package/dist/classes/quest/Stage.d.ts +1 -1
  25. package/dist/classes/quest/Stage.js +62 -0
  26. package/dist/classes/quest/Stage.js.map +1 -1
  27. package/dist/classes/quest/Stage.mjs +62 -0
  28. package/dist/classes/quest/Stage.mjs.map +1 -1
  29. package/dist/decorators/CommitmentDecorator.js +1 -1
  30. package/dist/decorators/CommitmentDecorator.js.map +1 -1
  31. package/dist/decorators/CommitmentDecorator.mjs +1 -1
  32. package/dist/decorators/CommitmentDecorator.mjs.map +1 -1
  33. package/dist/decorators/QuestDecorator.d.mts +1 -1
  34. package/dist/decorators/QuestDecorator.d.ts +1 -1
  35. package/dist/decorators/QuestDecorator.js +103 -4
  36. package/dist/decorators/QuestDecorator.js.map +1 -1
  37. package/dist/decorators/QuestDecorator.mjs +103 -4
  38. package/dist/decorators/QuestDecorator.mjs.map +1 -1
  39. package/dist/decorators/index.d.mts +1 -1
  40. package/dist/decorators/index.d.ts +1 -1
  41. package/dist/decorators/index.js +104 -5
  42. package/dist/decorators/index.js.map +1 -1
  43. package/dist/decorators/index.mjs +104 -5
  44. package/dist/decorators/index.mjs.map +1 -1
  45. package/dist/functions/ActivityFunctions.js.map +1 -1
  46. package/dist/functions/ActivityFunctions.mjs.map +1 -1
  47. package/dist/functions/NavigationFunctions.js.map +1 -1
  48. package/dist/functions/NavigationFunctions.mjs.map +1 -1
  49. package/dist/functions/RoutineFunctions.js.map +1 -1
  50. package/dist/functions/RoutineFunctions.mjs.map +1 -1
  51. package/dist/functions/index.js.map +1 -1
  52. package/dist/functions/index.mjs.map +1 -1
  53. package/dist/index.d.mts +1 -1
  54. package/dist/index.d.ts +1 -1
  55. package/dist/index.js +104 -5
  56. package/dist/index.js.map +1 -1
  57. package/dist/index.mjs +104 -5
  58. package/dist/index.mjs.map +1 -1
  59. package/dist/interface/index.d.mts +1 -1
  60. package/dist/interface/index.d.ts +1 -1
  61. package/dist/interface/quest/QuestProps.d.mts +1 -1
  62. package/dist/interface/quest/QuestProps.d.ts +1 -1
  63. package/dist/interface/quest/StageProps.d.mts +1 -1
  64. package/dist/interface/quest/StageProps.d.ts +1 -1
  65. package/dist/types/QuestsRequired.d.mts +1 -1
  66. package/dist/types/QuestsRequired.d.ts +1 -1
  67. package/dist/types/index.d.mts +1 -1
  68. package/dist/types/index.d.ts +1 -1
  69. package/package.json +1 -1
@@ -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,20 +37,42 @@ 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);
43
78
  /**
@@ -46,18 +81,36 @@ declare class StageQuest extends Stage {
46
81
  get goals(): GoalStage[];
47
82
  private get prevStageEndDay();
48
83
  private set prevStageEndDay(value);
84
+ /**
85
+ * The day when the stage starts.
86
+ */
49
87
  get startDay(): number | undefined;
88
+ /**
89
+ * Check if the stage can start.
90
+ */
50
91
  get canStart(): boolean;
92
+ /**
93
+ * The function that will be called when the stage starts.
94
+ */
51
95
  get onStart(): undefined | ((props: OnStartStage) => void);
52
96
  }
53
97
 
54
98
  declare class Quest extends StoredClassModel {
55
99
  constructor(id: string, stages: Stage[], props: QuestProps);
56
100
  private _stages;
101
+ /**
102
+ * The stages of the quest.
103
+ */
57
104
  get stages(): StageQuest[];
58
105
  private _name;
106
+ /**
107
+ * The name of the quest.
108
+ */
59
109
  get name(): string;
60
110
  private _description;
111
+ /**
112
+ * The description of the quest.
113
+ */
61
114
  get description(): string;
62
115
  private _renderIcon?;
63
116
  /**
@@ -70,14 +123,40 @@ declare class Quest extends StoredClassModel {
70
123
  */
71
124
  get renderImage(): ((props: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
72
125
  private _isInDevelopment;
126
+ /**
127
+ * If the quest is in development.
128
+ */
73
129
  get isInDevelopment(): boolean;
130
+ /**
131
+ * The index of the current stage.
132
+ */
74
133
  get currentStageIndex(): number | undefined;
75
134
  private set currentStageIndex(value);
135
+ /**
136
+ * The current stage.
137
+ */
76
138
  get currentStage(): StageQuest | undefined;
139
+ /**
140
+ * If the quest is started.
141
+ */
77
142
  get started(): boolean;
143
+ /**
144
+ * If the quest is completed.
145
+ */
78
146
  get completed(): boolean;
147
+ /**
148
+ * Start the quest.
149
+ * @param props The properties for the start stage. If you not want to pass any property, you can pass an {}.
150
+ * @returns
151
+ */
79
152
  start(props: OnStartStage): void;
80
- tryToGoNextStage(startProps: OnStartStage, endProps: OnEndStage): void;
153
+ /**
154
+ * Try to go to the next stage.
155
+ * @param startProps The properties for the start stage. If you not want to pass any property, you can pass an {}.
156
+ * @param endProps The properties for the end stage. If you not want to pass any property, you can pass an {}.
157
+ * @returns true if the stage was changed, false otherwise.
158
+ */
159
+ tryToGoNextStage(startProps: OnStartStage, endProps: OnEndStage): boolean;
81
160
  }
82
161
 
83
162
  type QuestsRequiredType = {
@@ -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,20 +37,42 @@ 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);
43
78
  /**
@@ -46,18 +81,36 @@ declare class StageQuest extends Stage {
46
81
  get goals(): GoalStage[];
47
82
  private get prevStageEndDay();
48
83
  private set prevStageEndDay(value);
84
+ /**
85
+ * The day when the stage starts.
86
+ */
49
87
  get startDay(): number | undefined;
88
+ /**
89
+ * Check if the stage can start.
90
+ */
50
91
  get canStart(): boolean;
92
+ /**
93
+ * The function that will be called when the stage starts.
94
+ */
51
95
  get onStart(): undefined | ((props: OnStartStage) => void);
52
96
  }
53
97
 
54
98
  declare class Quest extends StoredClassModel {
55
99
  constructor(id: string, stages: Stage[], props: QuestProps);
56
100
  private _stages;
101
+ /**
102
+ * The stages of the quest.
103
+ */
57
104
  get stages(): StageQuest[];
58
105
  private _name;
106
+ /**
107
+ * The name of the quest.
108
+ */
59
109
  get name(): string;
60
110
  private _description;
111
+ /**
112
+ * The description of the quest.
113
+ */
61
114
  get description(): string;
62
115
  private _renderIcon?;
63
116
  /**
@@ -70,14 +123,40 @@ declare class Quest extends StoredClassModel {
70
123
  */
71
124
  get renderImage(): ((props: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
72
125
  private _isInDevelopment;
126
+ /**
127
+ * If the quest is in development.
128
+ */
73
129
  get isInDevelopment(): boolean;
130
+ /**
131
+ * The index of the current stage.
132
+ */
74
133
  get currentStageIndex(): number | undefined;
75
134
  private set currentStageIndex(value);
135
+ /**
136
+ * The current stage.
137
+ */
76
138
  get currentStage(): StageQuest | undefined;
139
+ /**
140
+ * If the quest is started.
141
+ */
77
142
  get started(): boolean;
143
+ /**
144
+ * If the quest is completed.
145
+ */
78
146
  get completed(): boolean;
147
+ /**
148
+ * Start the quest.
149
+ * @param props The properties for the start stage. If you not want to pass any property, you can pass an {}.
150
+ * @returns
151
+ */
79
152
  start(props: OnStartStage): void;
80
- tryToGoNextStage(startProps: OnStartStage, endProps: OnEndStage): void;
153
+ /**
154
+ * Try to go to the next stage.
155
+ * @param startProps The properties for the start stage. If you not want to pass any property, you can pass an {}.
156
+ * @param endProps The properties for the end stage. If you not want to pass any property, you can pass an {}.
157
+ * @returns true if the stage was changed, false otherwise.
158
+ */
159
+ tryToGoNextStage(startProps: OnStartStage, endProps: OnEndStage): boolean;
81
160
  }
82
161
 
83
162
  type QuestsRequiredType = {
@@ -1,7 +1,7 @@
1
1
  export { default as ActivityModel } from './Activity.mjs';
2
2
  export { A as ActivityRoom, C as CommitmentBaseModel, L as LocationBaseModel, M as MapBaseModel, R as RoomBaseModel } from '../Commitment-CtNWnNQX.mjs';
3
3
  export { default as Goal } from './quest/Goal.mjs';
4
- export { S as Stage } from '../StageProps-xLLR0rjD.mjs';
4
+ export { S as Stage } from '../StageProps-CkXejAbn.mjs';
5
5
  import '@drincs/nqtr/dist/override';
6
6
  import '../ActivityProps-D45DQdcT.mjs';
7
7
  import '../types/OnRunActivityEvent.mjs';
@@ -1,7 +1,7 @@
1
1
  export { default as ActivityModel } from './Activity.js';
2
2
  export { A as ActivityRoom, C as CommitmentBaseModel, L as LocationBaseModel, M as MapBaseModel, R as RoomBaseModel } from '../Commitment-BJTIpBQ5.js';
3
3
  export { default as Goal } from './quest/Goal.js';
4
- export { S as Stage } from '../StageProps-DCZkZHwZ.js';
4
+ export { S as Stage } from '../StageProps-BFsiCaZT.js';
5
5
  import '@drincs/nqtr/dist/override';
6
6
  import '../ActivityProps-BkHX8xkA.js';
7
7
  import '../types/OnRunActivityEvent.js';
@@ -1037,9 +1037,15 @@ var Goal = class extends pixiVn.StoredClassModel {
1037
1037
  get description() {
1038
1038
  return this._description;
1039
1039
  }
1040
+ /**
1041
+ * The number of times the goal must be completed.
1042
+ */
1040
1043
  get need() {
1041
1044
  return this._need;
1042
1045
  }
1046
+ /**
1047
+ * The default number of times the goal has been completed.
1048
+ */
1043
1049
  get defaultHave() {
1044
1050
  return this._defaultHave;
1045
1051
  }
@@ -1063,12 +1069,21 @@ var Stage = class extends pixiVn.StoredClassModel {
1063
1069
  this._onStart = props.onStart;
1064
1070
  this._onEnd = props.onEnd;
1065
1071
  }
1072
+ /**
1073
+ * The name of the stage.
1074
+ */
1066
1075
  get name() {
1067
1076
  return this._name;
1068
1077
  }
1078
+ /**
1079
+ * The description of the stage.
1080
+ */
1069
1081
  get description() {
1070
1082
  return this._description;
1071
1083
  }
1084
+ /**
1085
+ * The advice description of the stage.
1086
+ */
1072
1087
  get adviceDescription() {
1073
1088
  return this._adviceDescription;
1074
1089
  }
@@ -1087,6 +1102,10 @@ var Stage = class extends pixiVn.StoredClassModel {
1087
1102
  }
1088
1103
  return (props) => render;
1089
1104
  }
1105
+ /**
1106
+ * The list of goals that the player needs to complete to finish the stage.
1107
+ * This is the list set by the developer. if you want to get the current goals, use the goals property.
1108
+ */
1090
1109
  get defaultGoals() {
1091
1110
  return this._defaultGoals;
1092
1111
  }
@@ -1096,21 +1115,39 @@ var Stage = class extends pixiVn.StoredClassModel {
1096
1115
  get flags() {
1097
1116
  return this._flags;
1098
1117
  }
1118
+ /**
1119
+ * The number of days required to start the stage.
1120
+ */
1099
1121
  get daysRequiredToStart() {
1100
1122
  return this._daysRequiredToStart || 0;
1101
1123
  }
1124
+ /**
1125
+ * The list of flags required to start the stage.
1126
+ */
1102
1127
  get flagsRequiredToStart() {
1103
1128
  return this._flagsRequiredToStart;
1104
1129
  }
1130
+ /**
1131
+ * The list of quests required to start the stage.
1132
+ */
1105
1133
  get questsRequiredToStart() {
1106
1134
  return this._questsRequiredToStart || [];
1107
1135
  }
1136
+ /**
1137
+ * The description of the request to start the stage.
1138
+ */
1108
1139
  get requestDescriptionToStart() {
1109
1140
  return this._requestDescriptionToStart;
1110
1141
  }
1142
+ /**
1143
+ * The function that will be called when the stage starts.
1144
+ */
1111
1145
  get onStart() {
1112
1146
  return this._onStart;
1113
1147
  }
1148
+ /**
1149
+ * The function that will be called when the stage ends.
1150
+ */
1114
1151
  get onEnd() {
1115
1152
  return this._onEnd;
1116
1153
  }