@drincs/nqtr 0.2.8 → 0.2.10
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-ssZax5Ip.d.ts → StageProps-CCjGI625.d.ts} +4 -4
- package/dist/{StageProps-vuObH5D2.d.mts → StageProps-CuE_n1Wg.d.mts} +4 -4
- package/dist/classes/index.d.mts +1 -1
- package/dist/classes/index.d.ts +1 -1
- package/dist/classes/index.js +8 -24
- package/dist/classes/index.js.map +1 -1
- package/dist/classes/index.mjs +8 -24
- 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 -1
- package/dist/classes/quest/Quest.d.ts +1 -1
- package/dist/classes/quest/Quest.js +8 -24
- package/dist/classes/quest/Quest.js.map +1 -1
- package/dist/classes/quest/Quest.mjs +8 -24
- package/dist/classes/quest/Quest.mjs.map +1 -1
- package/dist/classes/quest/Stage.d.mts +1 -1
- package/dist/classes/quest/Stage.d.ts +1 -1
- package/dist/classes/quest/Stage.js +3 -11
- package/dist/classes/quest/Stage.js.map +1 -1
- package/dist/classes/quest/Stage.mjs +3 -11
- package/dist/classes/quest/Stage.mjs.map +1 -1
- package/dist/decorators/QuestDecorator.d.mts +1 -1
- package/dist/decorators/QuestDecorator.d.ts +1 -1
- package/dist/decorators/QuestDecorator.js +8 -24
- package/dist/decorators/QuestDecorator.js.map +1 -1
- package/dist/decorators/QuestDecorator.mjs +8 -24
- package/dist/decorators/QuestDecorator.mjs.map +1 -1
- package/dist/decorators/index.d.mts +1 -1
- package/dist/decorators/index.d.ts +1 -1
- package/dist/decorators/index.js +8 -24
- package/dist/decorators/index.js.map +1 -1
- package/dist/decorators/index.mjs +8 -24
- 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.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 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -24
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -24
- package/dist/index.mjs.map +1 -1
- package/dist/interface/index.d.mts +1 -1
- package/dist/interface/index.d.ts +1 -1
- package/dist/interface/quest/QuestProps.d.mts +1 -1
- package/dist/interface/quest/QuestProps.d.ts +1 -1
- package/dist/interface/quest/StageProps.d.mts +1 -1
- package/dist/interface/quest/StageProps.d.ts +1 -1
- package/dist/override/NeighboringMapsInterface.d.mts +20 -0
- package/dist/override/NeighboringMapsInterface.d.ts +20 -0
- package/dist/override/NeighboringMapsInterface.js +4 -0
- package/dist/override/NeighboringMapsInterface.js.map +1 -0
- package/dist/override/NeighboringMapsInterface.mjs +3 -0
- package/dist/override/NeighboringMapsInterface.mjs.map +1 -0
- package/dist/types/QuestsRequired.d.mts +1 -1
- package/dist/types/QuestsRequired.d.ts +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
package/dist/classes/index.mjs
CHANGED
|
@@ -1062,21 +1062,13 @@ var Stage = class extends StoredClassModel {
|
|
|
1062
1062
|
* The function that will be called when the stage starts.
|
|
1063
1063
|
*/
|
|
1064
1064
|
get onStart() {
|
|
1065
|
-
|
|
1066
|
-
if (onStart === void 0) {
|
|
1067
|
-
return void 0;
|
|
1068
|
-
}
|
|
1069
|
-
return (props) => onStart(this, props);
|
|
1065
|
+
return this._onStart;
|
|
1070
1066
|
}
|
|
1071
1067
|
/**
|
|
1072
1068
|
* The function that will be called when the stage ends.
|
|
1073
1069
|
*/
|
|
1074
1070
|
get onEnd() {
|
|
1075
|
-
|
|
1076
|
-
if (onEnd === void 0) {
|
|
1077
|
-
return void 0;
|
|
1078
|
-
}
|
|
1079
|
-
return (props) => onEnd(this, props);
|
|
1071
|
+
return this._onEnd;
|
|
1080
1072
|
}
|
|
1081
1073
|
};
|
|
1082
1074
|
var StageQuest = class extends Stage {
|
|
@@ -1179,7 +1171,7 @@ var StageQuest = class extends Stage {
|
|
|
1179
1171
|
if (this.canStart) {
|
|
1180
1172
|
this.started = true;
|
|
1181
1173
|
if (this.onStart) {
|
|
1182
|
-
this.onStart(props);
|
|
1174
|
+
this.onStart(this, props);
|
|
1183
1175
|
}
|
|
1184
1176
|
} else {
|
|
1185
1177
|
console.warn(`[NQTR] Stage ${this.id} can't start`);
|
|
@@ -1295,21 +1287,13 @@ var Quest = class extends StoredClassModel {
|
|
|
1295
1287
|
* The function that will be called when the quest starts.
|
|
1296
1288
|
*/
|
|
1297
1289
|
get onStart() {
|
|
1298
|
-
|
|
1299
|
-
if (onStart === void 0) {
|
|
1300
|
-
return void 0;
|
|
1301
|
-
}
|
|
1302
|
-
return (props) => onStart(this, props);
|
|
1290
|
+
return this._onStart;
|
|
1303
1291
|
}
|
|
1304
1292
|
/**
|
|
1305
1293
|
* The function that will be called when the quest goes to the next stage.
|
|
1306
1294
|
*/
|
|
1307
1295
|
get onNextStage() {
|
|
1308
|
-
|
|
1309
|
-
if (onNext === void 0) {
|
|
1310
|
-
return void 0;
|
|
1311
|
-
}
|
|
1312
|
-
return (props) => onNext(this, props);
|
|
1296
|
+
return this._onNextStage;
|
|
1313
1297
|
}
|
|
1314
1298
|
/**
|
|
1315
1299
|
* Start the quest.
|
|
@@ -1328,7 +1312,7 @@ var Quest = class extends StoredClassModel {
|
|
|
1328
1312
|
this.currentStageIndex = 0;
|
|
1329
1313
|
let currentStage = this.currentStage;
|
|
1330
1314
|
if (currentStage && currentStage.start) {
|
|
1331
|
-
this.onStart && this.onStart(props);
|
|
1315
|
+
this.onStart && this.onStart(this, props);
|
|
1332
1316
|
return currentStage.start(props);
|
|
1333
1317
|
} else {
|
|
1334
1318
|
console.error(`[NQTR] Quest ${this.id} has no start stage`);
|
|
@@ -1394,9 +1378,9 @@ var Quest = class extends StoredClassModel {
|
|
|
1394
1378
|
return false;
|
|
1395
1379
|
}
|
|
1396
1380
|
this.currentStageIndex = currentStageIndex + 1;
|
|
1397
|
-
this.onNextStage && this.onNextStage(props);
|
|
1381
|
+
this.onNextStage && this.onNextStage(this, props);
|
|
1398
1382
|
if (prevStage && prevStage.onEnd) {
|
|
1399
|
-
prevStage.onEnd(props);
|
|
1383
|
+
prevStage.onEnd(prevStage, props);
|
|
1400
1384
|
}
|
|
1401
1385
|
let nextCurrentStage = this.currentStage;
|
|
1402
1386
|
if (nextCurrentStage) {
|