@drincs/nqtr 0.2.6 → 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.
- package/dist/{StageProps-DVGvhQgr.d.ts → StageProps-ssZax5Ip.d.ts} +18 -22
- package/dist/{StageProps-BP4soUUZ.d.mts → StageProps-vuObH5D2.d.mts} +18 -22
- package/dist/classes/index.d.mts +1 -2
- package/dist/classes/index.d.ts +1 -2
- package/dist/classes/index.js +11 -14
- package/dist/classes/index.js.map +1 -1
- package/dist/classes/index.mjs +11 -14
- package/dist/classes/index.mjs.map +1 -1
- package/dist/classes/navigation/Room.js.map +1 -1
- package/dist/classes/navigation/Room.mjs.map +1 -1
- package/dist/classes/quest/Quest.d.mts +1 -2
- package/dist/classes/quest/Quest.d.ts +1 -2
- package/dist/classes/quest/Quest.js +11 -14
- package/dist/classes/quest/Quest.js.map +1 -1
- package/dist/classes/quest/Quest.mjs +11 -14
- package/dist/classes/quest/Quest.mjs.map +1 -1
- package/dist/classes/quest/Stage.d.mts +1 -2
- package/dist/classes/quest/Stage.d.ts +1 -2
- package/dist/classes/quest/Stage.js.map +1 -1
- package/dist/classes/quest/Stage.mjs.map +1 -1
- package/dist/decorators/QuestDecorator.d.mts +1 -2
- package/dist/decorators/QuestDecorator.d.ts +1 -2
- package/dist/decorators/QuestDecorator.js +11 -14
- package/dist/decorators/QuestDecorator.js.map +1 -1
- package/dist/decorators/QuestDecorator.mjs +11 -14
- package/dist/decorators/QuestDecorator.mjs.map +1 -1
- package/dist/decorators/index.d.mts +1 -2
- package/dist/decorators/index.d.ts +1 -2
- package/dist/decorators/index.js +11 -14
- package/dist/decorators/index.js.map +1 -1
- package/dist/decorators/index.mjs +11 -14
- package/dist/decorators/index.mjs.map +1 -1
- package/dist/functions/ActivityFunctions.js.map +1 -1
- package/dist/functions/ActivityFunctions.mjs.map +1 -1
- package/dist/functions/NavigationFunctions.js.map +1 -1
- package/dist/functions/NavigationFunctions.mjs.map +1 -1
- package/dist/functions/QuestFunctions.d.mts +2 -2
- package/dist/functions/QuestFunctions.d.ts +2 -2
- package/dist/functions/QuestFunctions.js.map +1 -1
- package/dist/functions/QuestFunctions.mjs.map +1 -1
- package/dist/functions/RoutineFunctions.js.map +1 -1
- package/dist/functions/RoutineFunctions.mjs.map +1 -1
- package/dist/functions/index.js.map +1 -1
- package/dist/functions/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +11 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -14
- package/dist/index.mjs.map +1 -1
- package/dist/interface/index.d.mts +1 -2
- package/dist/interface/index.d.ts +1 -2
- package/dist/interface/quest/QuestProps.d.mts +1 -2
- package/dist/interface/quest/QuestProps.d.ts +1 -2
- package/dist/interface/quest/StageProps.d.mts +1 -2
- package/dist/interface/quest/StageProps.d.ts +1 -2
- package/dist/override/{OnStartStageQuest.d.mts → OnStartEndStageQuest.d.mts} +3 -3
- package/dist/override/{OnStartStageQuest.d.ts → OnStartEndStageQuest.d.ts} +3 -3
- package/dist/override/OnStartEndStageQuest.js +4 -0
- package/dist/override/OnStartEndStageQuest.mjs +3 -0
- package/dist/override/index.d.mts +1 -2
- package/dist/override/index.d.ts +1 -2
- package/dist/types/QuestsRequired.d.mts +1 -2
- package/dist/types/QuestsRequired.d.ts +1 -2
- package/dist/types/index.d.mts +1 -2
- package/dist/types/index.d.ts +1 -2
- package/package.json +2 -2
- package/dist/override/OnEndStageQuest.d.mts +0 -19
- package/dist/override/OnEndStageQuest.d.ts +0 -19
- package/dist/override/OnEndStageQuest.js +0 -4
- package/dist/override/OnEndStageQuest.mjs +0 -3
- package/dist/override/OnStartStageQuest.js +0 -4
- package/dist/override/OnStartStageQuest.js.map +0 -1
- package/dist/override/OnStartStageQuest.mjs +0 -3
- package/dist/override/OnStartStageQuest.mjs.map +0 -1
- /package/dist/override/{OnEndStageQuest.js.map → OnStartEndStageQuest.js.map} +0 -0
- /package/dist/override/{OnEndStageQuest.mjs.map → OnStartEndStageQuest.mjs.map} +0 -0
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { OnRenderGraphicItemProps, GraphicItemType,
|
|
1
|
+
import { OnRenderGraphicItemProps, GraphicItemType, OnStartEndStageQuest } from '@drincs/nqtr/dist/override';
|
|
2
2
|
import { StoredClassModel } from '@drincs/pixi-vn';
|
|
3
3
|
import Goal, { GoalStage } from './classes/quest/Goal.js';
|
|
4
4
|
import StageFlags from './interface/quest/StageFlags.js';
|
|
5
|
-
import OnEndStageQuest$1 from './override/OnEndStageQuest.js';
|
|
6
5
|
|
|
7
6
|
declare class Stage extends StoredClassModel implements StageProps {
|
|
8
7
|
constructor(id: string, props: StageProps);
|
|
@@ -61,12 +60,12 @@ declare class Stage extends StoredClassModel implements StageProps {
|
|
|
61
60
|
/**
|
|
62
61
|
* The function that will be called when the stage starts.
|
|
63
62
|
*/
|
|
64
|
-
get onStart(): undefined | ((props:
|
|
63
|
+
get onStart(): undefined | ((props: OnStartEndStageQuest) => void);
|
|
65
64
|
private _onEnd?;
|
|
66
65
|
/**
|
|
67
66
|
* The function that will be called when the stage ends.
|
|
68
67
|
*/
|
|
69
|
-
get onEnd(): undefined | ((props:
|
|
68
|
+
get onEnd(): undefined | ((props: OnStartEndStageQuest) => void);
|
|
70
69
|
}
|
|
71
70
|
declare class StageQuest extends Stage {
|
|
72
71
|
constructor(id: string, props: StageProps);
|
|
@@ -102,7 +101,7 @@ declare class StageQuest extends Stage {
|
|
|
102
101
|
/**
|
|
103
102
|
* The function that will be called when the stage starts.
|
|
104
103
|
*/
|
|
105
|
-
start(props:
|
|
104
|
+
start(props: OnStartEndStageQuest): void;
|
|
106
105
|
}
|
|
107
106
|
|
|
108
107
|
declare class Quest extends StoredClassModel {
|
|
@@ -158,42 +157,39 @@ declare class Quest extends StoredClassModel {
|
|
|
158
157
|
/**
|
|
159
158
|
* The function that will be called when the quest starts.
|
|
160
159
|
*/
|
|
161
|
-
get onStart(): undefined | ((props:
|
|
160
|
+
get onStart(): undefined | ((props: OnStartEndStageQuest) => void);
|
|
162
161
|
private _onNextStage?;
|
|
163
162
|
/**
|
|
164
163
|
* The function that will be called when the quest goes to the next stage.
|
|
165
164
|
*/
|
|
166
|
-
get onNextStage(): undefined | ((props:
|
|
165
|
+
get onNextStage(): undefined | ((props: OnStartEndStageQuest) => void);
|
|
167
166
|
/**
|
|
168
167
|
* Start the quest.
|
|
169
168
|
* @param props The properties for the start stage. If you not want to pass any property, you can pass an {}.
|
|
170
169
|
* @returns
|
|
171
170
|
*/
|
|
172
|
-
start(props:
|
|
171
|
+
start(props: OnStartEndStageQuest): void;
|
|
173
172
|
/**
|
|
174
173
|
* Go to the next stage if the current stage is completed.
|
|
175
174
|
* If you want to force the change of stage, use goNextStage.
|
|
176
|
-
* @param
|
|
177
|
-
* @param endProps The properties for the end stage. If you not want to pass any property, you can pass an {}.
|
|
175
|
+
* @param props The properties. If you not want to pass any property, you can pass an {}.
|
|
178
176
|
* @returns true if the stage was changed, false otherwise.
|
|
179
177
|
*/
|
|
180
|
-
tryToGoNextStage(
|
|
178
|
+
tryToGoNextStage(props: OnStartEndStageQuest): boolean;
|
|
181
179
|
/**
|
|
182
180
|
* Complete the current stage and go to the next stage.
|
|
183
181
|
* If you want to go to the next stage only if the current stage is completed, use tryToGoNextStage.
|
|
184
|
-
* @param
|
|
185
|
-
* @param endProps The properties for the end stage. If you not want to pass any property, you can pass an {}.
|
|
182
|
+
* @param props The properties. If you not want to pass any property, you can pass an {}.
|
|
186
183
|
* @returns true if the stage was changed, false otherwise.
|
|
187
184
|
*/
|
|
188
|
-
completeCurrentStageAndGoNext(
|
|
185
|
+
completeCurrentStageAndGoNext(props: OnStartEndStageQuest): boolean;
|
|
189
186
|
/**
|
|
190
187
|
* Go to the next stage without checking if the current stage is completed.
|
|
191
188
|
* If you want to go to the next stage only if the current stage is completed, use tryToGoNextStage.
|
|
192
|
-
* @param
|
|
193
|
-
* @param endProps
|
|
189
|
+
* @param props The properties. If you not want to pass any property, you can pass an {}.
|
|
194
190
|
* @returns returns true if the stage was changed, false otherwise.
|
|
195
191
|
*/
|
|
196
|
-
goNextStage(
|
|
192
|
+
goNextStage(props: OnStartEndStageQuest): boolean;
|
|
197
193
|
/**
|
|
198
194
|
* If the current stage must start. It is true if the current stage is not started, can start and not completed.
|
|
199
195
|
*/
|
|
@@ -202,7 +198,7 @@ declare class Quest extends StoredClassModel {
|
|
|
202
198
|
* Start the current stage.
|
|
203
199
|
* @param props The properties for the start stage. If you not want to pass any property, you can pass an {}.
|
|
204
200
|
*/
|
|
205
|
-
startCurrentStage(props:
|
|
201
|
+
startCurrentStage(props: OnStartEndStageQuest): void;
|
|
206
202
|
}
|
|
207
203
|
|
|
208
204
|
type QuestsRequiredType = {
|
|
@@ -249,11 +245,11 @@ interface QuestProps {
|
|
|
249
245
|
/**
|
|
250
246
|
* The function that will be executed when the quest starts.
|
|
251
247
|
*/
|
|
252
|
-
onStart?: (quest: Quest, props:
|
|
248
|
+
onStart?: (quest: Quest, props: OnStartEndStageQuest) => void;
|
|
253
249
|
/**
|
|
254
250
|
* The function that will be executed when a stage end in the quest.
|
|
255
251
|
*/
|
|
256
|
-
onNextStage?: (quest: Quest, props:
|
|
252
|
+
onNextStage?: (quest: Quest, props: OnStartEndStageQuest) => void;
|
|
257
253
|
}
|
|
258
254
|
|
|
259
255
|
interface StageProps {
|
|
@@ -320,11 +316,11 @@ interface StageProps {
|
|
|
320
316
|
/**
|
|
321
317
|
* The function that will be executed when the stage starts.
|
|
322
318
|
*/
|
|
323
|
-
onStart?: (stage: Stage, props:
|
|
319
|
+
onStart?: (stage: Stage, props: OnStartEndStageQuest) => void;
|
|
324
320
|
/**
|
|
325
321
|
* The function that will be executed when the stage ends.
|
|
326
322
|
*/
|
|
327
|
-
onEnd?: (stage: Stage, props:
|
|
323
|
+
onEnd?: (stage: Stage, props: OnStartEndStageQuest) => void;
|
|
328
324
|
}
|
|
329
325
|
|
|
330
326
|
export { Quest as Q, Stage as S, type QuestProps as a, type StageProps as b, type QuestsRequiredType as c, StageQuest as d };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { OnRenderGraphicItemProps, GraphicItemType,
|
|
1
|
+
import { OnRenderGraphicItemProps, GraphicItemType, OnStartEndStageQuest } from '@drincs/nqtr/dist/override';
|
|
2
2
|
import { StoredClassModel } from '@drincs/pixi-vn';
|
|
3
3
|
import Goal, { GoalStage } from './classes/quest/Goal.mjs';
|
|
4
4
|
import StageFlags from './interface/quest/StageFlags.mjs';
|
|
5
|
-
import OnEndStageQuest$1 from './override/OnEndStageQuest.mjs';
|
|
6
5
|
|
|
7
6
|
declare class Stage extends StoredClassModel implements StageProps {
|
|
8
7
|
constructor(id: string, props: StageProps);
|
|
@@ -61,12 +60,12 @@ declare class Stage extends StoredClassModel implements StageProps {
|
|
|
61
60
|
/**
|
|
62
61
|
* The function that will be called when the stage starts.
|
|
63
62
|
*/
|
|
64
|
-
get onStart(): undefined | ((props:
|
|
63
|
+
get onStart(): undefined | ((props: OnStartEndStageQuest) => void);
|
|
65
64
|
private _onEnd?;
|
|
66
65
|
/**
|
|
67
66
|
* The function that will be called when the stage ends.
|
|
68
67
|
*/
|
|
69
|
-
get onEnd(): undefined | ((props:
|
|
68
|
+
get onEnd(): undefined | ((props: OnStartEndStageQuest) => void);
|
|
70
69
|
}
|
|
71
70
|
declare class StageQuest extends Stage {
|
|
72
71
|
constructor(id: string, props: StageProps);
|
|
@@ -102,7 +101,7 @@ declare class StageQuest extends Stage {
|
|
|
102
101
|
/**
|
|
103
102
|
* The function that will be called when the stage starts.
|
|
104
103
|
*/
|
|
105
|
-
start(props:
|
|
104
|
+
start(props: OnStartEndStageQuest): void;
|
|
106
105
|
}
|
|
107
106
|
|
|
108
107
|
declare class Quest extends StoredClassModel {
|
|
@@ -158,42 +157,39 @@ declare class Quest extends StoredClassModel {
|
|
|
158
157
|
/**
|
|
159
158
|
* The function that will be called when the quest starts.
|
|
160
159
|
*/
|
|
161
|
-
get onStart(): undefined | ((props:
|
|
160
|
+
get onStart(): undefined | ((props: OnStartEndStageQuest) => void);
|
|
162
161
|
private _onNextStage?;
|
|
163
162
|
/**
|
|
164
163
|
* The function that will be called when the quest goes to the next stage.
|
|
165
164
|
*/
|
|
166
|
-
get onNextStage(): undefined | ((props:
|
|
165
|
+
get onNextStage(): undefined | ((props: OnStartEndStageQuest) => void);
|
|
167
166
|
/**
|
|
168
167
|
* Start the quest.
|
|
169
168
|
* @param props The properties for the start stage. If you not want to pass any property, you can pass an {}.
|
|
170
169
|
* @returns
|
|
171
170
|
*/
|
|
172
|
-
start(props:
|
|
171
|
+
start(props: OnStartEndStageQuest): void;
|
|
173
172
|
/**
|
|
174
173
|
* Go to the next stage if the current stage is completed.
|
|
175
174
|
* If you want to force the change of stage, use goNextStage.
|
|
176
|
-
* @param
|
|
177
|
-
* @param endProps The properties for the end stage. If you not want to pass any property, you can pass an {}.
|
|
175
|
+
* @param props The properties. If you not want to pass any property, you can pass an {}.
|
|
178
176
|
* @returns true if the stage was changed, false otherwise.
|
|
179
177
|
*/
|
|
180
|
-
tryToGoNextStage(
|
|
178
|
+
tryToGoNextStage(props: OnStartEndStageQuest): boolean;
|
|
181
179
|
/**
|
|
182
180
|
* Complete the current stage and go to the next stage.
|
|
183
181
|
* If you want to go to the next stage only if the current stage is completed, use tryToGoNextStage.
|
|
184
|
-
* @param
|
|
185
|
-
* @param endProps The properties for the end stage. If you not want to pass any property, you can pass an {}.
|
|
182
|
+
* @param props The properties. If you not want to pass any property, you can pass an {}.
|
|
186
183
|
* @returns true if the stage was changed, false otherwise.
|
|
187
184
|
*/
|
|
188
|
-
completeCurrentStageAndGoNext(
|
|
185
|
+
completeCurrentStageAndGoNext(props: OnStartEndStageQuest): boolean;
|
|
189
186
|
/**
|
|
190
187
|
* Go to the next stage without checking if the current stage is completed.
|
|
191
188
|
* If you want to go to the next stage only if the current stage is completed, use tryToGoNextStage.
|
|
192
|
-
* @param
|
|
193
|
-
* @param endProps
|
|
189
|
+
* @param props The properties. If you not want to pass any property, you can pass an {}.
|
|
194
190
|
* @returns returns true if the stage was changed, false otherwise.
|
|
195
191
|
*/
|
|
196
|
-
goNextStage(
|
|
192
|
+
goNextStage(props: OnStartEndStageQuest): boolean;
|
|
197
193
|
/**
|
|
198
194
|
* If the current stage must start. It is true if the current stage is not started, can start and not completed.
|
|
199
195
|
*/
|
|
@@ -202,7 +198,7 @@ declare class Quest extends StoredClassModel {
|
|
|
202
198
|
* Start the current stage.
|
|
203
199
|
* @param props The properties for the start stage. If you not want to pass any property, you can pass an {}.
|
|
204
200
|
*/
|
|
205
|
-
startCurrentStage(props:
|
|
201
|
+
startCurrentStage(props: OnStartEndStageQuest): void;
|
|
206
202
|
}
|
|
207
203
|
|
|
208
204
|
type QuestsRequiredType = {
|
|
@@ -249,11 +245,11 @@ interface QuestProps {
|
|
|
249
245
|
/**
|
|
250
246
|
* The function that will be executed when the quest starts.
|
|
251
247
|
*/
|
|
252
|
-
onStart?: (quest: Quest, props:
|
|
248
|
+
onStart?: (quest: Quest, props: OnStartEndStageQuest) => void;
|
|
253
249
|
/**
|
|
254
250
|
* The function that will be executed when a stage end in the quest.
|
|
255
251
|
*/
|
|
256
|
-
onNextStage?: (quest: Quest, props:
|
|
252
|
+
onNextStage?: (quest: Quest, props: OnStartEndStageQuest) => void;
|
|
257
253
|
}
|
|
258
254
|
|
|
259
255
|
interface StageProps {
|
|
@@ -320,11 +316,11 @@ interface StageProps {
|
|
|
320
316
|
/**
|
|
321
317
|
* The function that will be executed when the stage starts.
|
|
322
318
|
*/
|
|
323
|
-
onStart?: (stage: Stage, props:
|
|
319
|
+
onStart?: (stage: Stage, props: OnStartEndStageQuest) => void;
|
|
324
320
|
/**
|
|
325
321
|
* The function that will be executed when the stage ends.
|
|
326
322
|
*/
|
|
327
|
-
onEnd?: (stage: Stage, props:
|
|
323
|
+
onEnd?: (stage: Stage, props: OnStartEndStageQuest) => void;
|
|
328
324
|
}
|
|
329
325
|
|
|
330
326
|
export { Quest as Q, Stage as S, type QuestProps as a, type StageProps as b, type QuestsRequiredType as c, StageQuest as d };
|
package/dist/classes/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { A as ActivityRoom, C as CommitmentBaseModel, L as LocationBaseModel, M as MapBaseModel, R as RoomBaseModel } from '../Commitment-BHB-jYOi.mjs';
|
|
2
2
|
export { default as Goal } from './quest/Goal.mjs';
|
|
3
|
-
export { Q as Quest, S as Stage } from '../StageProps-
|
|
3
|
+
export { Q as Quest, S as Stage } from '../StageProps-vuObH5D2.mjs';
|
|
4
4
|
import '@drincs/nqtr/dist/override';
|
|
5
5
|
import '@drincs/pixi-vn';
|
|
6
6
|
import '../ActivityProps-D45DQdcT.mjs';
|
|
@@ -10,4 +10,3 @@ import '../types/ExecutionType.mjs';
|
|
|
10
10
|
import '../types/OnRunCommitmentEvent.mjs';
|
|
11
11
|
import '../interface/quest/GoalProps.mjs';
|
|
12
12
|
import '../interface/quest/StageFlags.mjs';
|
|
13
|
-
import '../override/OnEndStageQuest.mjs';
|
package/dist/classes/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { A as ActivityRoom, C as CommitmentBaseModel, L as LocationBaseModel, M as MapBaseModel, R as RoomBaseModel } from '../Commitment-D-1lsnnU.js';
|
|
2
2
|
export { default as Goal } from './quest/Goal.js';
|
|
3
|
-
export { Q as Quest, S as Stage } from '../StageProps-
|
|
3
|
+
export { Q as Quest, S as Stage } from '../StageProps-ssZax5Ip.js';
|
|
4
4
|
import '@drincs/nqtr/dist/override';
|
|
5
5
|
import '@drincs/pixi-vn';
|
|
6
6
|
import '../ActivityProps-BkHX8xkA.js';
|
|
@@ -10,4 +10,3 @@ import '../types/ExecutionType.js';
|
|
|
10
10
|
import '../types/OnRunCommitmentEvent.js';
|
|
11
11
|
import '../interface/quest/GoalProps.js';
|
|
12
12
|
import '../interface/quest/StageFlags.js';
|
|
13
|
-
import '../override/OnEndStageQuest.js';
|
package/dist/classes/index.js
CHANGED
|
@@ -1339,11 +1339,10 @@ var Quest = class extends pixiVn.StoredClassModel {
|
|
|
1339
1339
|
/**
|
|
1340
1340
|
* Go to the next stage if the current stage is completed.
|
|
1341
1341
|
* If you want to force the change of stage, use goNextStage.
|
|
1342
|
-
* @param
|
|
1343
|
-
* @param endProps The properties for the end stage. If you not want to pass any property, you can pass an {}.
|
|
1342
|
+
* @param props The properties. If you not want to pass any property, you can pass an {}.
|
|
1344
1343
|
* @returns true if the stage was changed, false otherwise.
|
|
1345
1344
|
*/
|
|
1346
|
-
tryToGoNextStage(
|
|
1345
|
+
tryToGoNextStage(props) {
|
|
1347
1346
|
if (!this.started) {
|
|
1348
1347
|
return false;
|
|
1349
1348
|
}
|
|
@@ -1356,34 +1355,32 @@ var Quest = class extends pixiVn.StoredClassModel {
|
|
|
1356
1355
|
return false;
|
|
1357
1356
|
}
|
|
1358
1357
|
if (currentStage.completed) {
|
|
1359
|
-
return this.goNextStage(
|
|
1358
|
+
return this.goNextStage(props);
|
|
1360
1359
|
}
|
|
1361
1360
|
return false;
|
|
1362
1361
|
}
|
|
1363
1362
|
/**
|
|
1364
1363
|
* Complete the current stage and go to the next stage.
|
|
1365
1364
|
* If you want to go to the next stage only if the current stage is completed, use tryToGoNextStage.
|
|
1366
|
-
* @param
|
|
1367
|
-
* @param endProps The properties for the end stage. If you not want to pass any property, you can pass an {}.
|
|
1365
|
+
* @param props The properties. If you not want to pass any property, you can pass an {}.
|
|
1368
1366
|
* @returns true if the stage was changed, false otherwise.
|
|
1369
1367
|
*/
|
|
1370
|
-
completeCurrentStageAndGoNext(
|
|
1368
|
+
completeCurrentStageAndGoNext(props) {
|
|
1371
1369
|
let currentStage = this.currentStage;
|
|
1372
1370
|
if (!currentStage) {
|
|
1373
1371
|
console.error(`[NQTR] Quest ${this.id} has no current stage`);
|
|
1374
1372
|
return false;
|
|
1375
1373
|
}
|
|
1376
1374
|
currentStage.completed = true;
|
|
1377
|
-
return this.goNextStage(
|
|
1375
|
+
return this.goNextStage(props);
|
|
1378
1376
|
}
|
|
1379
1377
|
/**
|
|
1380
1378
|
* Go to the next stage without checking if the current stage is completed.
|
|
1381
1379
|
* If you want to go to the next stage only if the current stage is completed, use tryToGoNextStage.
|
|
1382
|
-
* @param
|
|
1383
|
-
* @param endProps
|
|
1380
|
+
* @param props The properties. If you not want to pass any property, you can pass an {}.
|
|
1384
1381
|
* @returns returns true if the stage was changed, false otherwise.
|
|
1385
1382
|
*/
|
|
1386
|
-
goNextStage(
|
|
1383
|
+
goNextStage(props) {
|
|
1387
1384
|
if (!this.started) {
|
|
1388
1385
|
console.warn(`[NQTR] Quest ${this.id} is not started`);
|
|
1389
1386
|
return false;
|
|
@@ -1399,15 +1396,15 @@ var Quest = class extends pixiVn.StoredClassModel {
|
|
|
1399
1396
|
return false;
|
|
1400
1397
|
}
|
|
1401
1398
|
this.currentStageIndex = currentStageIndex + 1;
|
|
1402
|
-
this.onNextStage && this.onNextStage(
|
|
1399
|
+
this.onNextStage && this.onNextStage(props);
|
|
1403
1400
|
if (prevStage && prevStage.onEnd) {
|
|
1404
|
-
prevStage.onEnd(
|
|
1401
|
+
prevStage.onEnd(props);
|
|
1405
1402
|
}
|
|
1406
1403
|
let nextCurrentStage = this.currentStage;
|
|
1407
1404
|
if (nextCurrentStage) {
|
|
1408
1405
|
nextCurrentStage.inizialize();
|
|
1409
1406
|
if (this.currentStageMustStart) {
|
|
1410
|
-
this.startCurrentStage(
|
|
1407
|
+
this.startCurrentStage(props);
|
|
1411
1408
|
}
|
|
1412
1409
|
}
|
|
1413
1410
|
return true;
|