@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/index.mjs
CHANGED
|
@@ -1277,21 +1277,13 @@ var Stage = class extends StoredClassModel {
|
|
|
1277
1277
|
* The function that will be called when the stage starts.
|
|
1278
1278
|
*/
|
|
1279
1279
|
get onStart() {
|
|
1280
|
-
|
|
1281
|
-
if (onStart === void 0) {
|
|
1282
|
-
return void 0;
|
|
1283
|
-
}
|
|
1284
|
-
return (props) => onStart(this, props);
|
|
1280
|
+
return this._onStart;
|
|
1285
1281
|
}
|
|
1286
1282
|
/**
|
|
1287
1283
|
* The function that will be called when the stage ends.
|
|
1288
1284
|
*/
|
|
1289
1285
|
get onEnd() {
|
|
1290
|
-
|
|
1291
|
-
if (onEnd === void 0) {
|
|
1292
|
-
return void 0;
|
|
1293
|
-
}
|
|
1294
|
-
return (props) => onEnd(this, props);
|
|
1286
|
+
return this._onEnd;
|
|
1295
1287
|
}
|
|
1296
1288
|
};
|
|
1297
1289
|
var StageQuest = class extends Stage {
|
|
@@ -1394,7 +1386,7 @@ var StageQuest = class extends Stage {
|
|
|
1394
1386
|
if (this.canStart) {
|
|
1395
1387
|
this.started = true;
|
|
1396
1388
|
if (this.onStart) {
|
|
1397
|
-
this.onStart(props);
|
|
1389
|
+
this.onStart(this, props);
|
|
1398
1390
|
}
|
|
1399
1391
|
} else {
|
|
1400
1392
|
console.warn(`[NQTR] Stage ${this.id} can't start`);
|
|
@@ -1510,21 +1502,13 @@ var Quest = class extends StoredClassModel {
|
|
|
1510
1502
|
* The function that will be called when the quest starts.
|
|
1511
1503
|
*/
|
|
1512
1504
|
get onStart() {
|
|
1513
|
-
|
|
1514
|
-
if (onStart === void 0) {
|
|
1515
|
-
return void 0;
|
|
1516
|
-
}
|
|
1517
|
-
return (props) => onStart(this, props);
|
|
1505
|
+
return this._onStart;
|
|
1518
1506
|
}
|
|
1519
1507
|
/**
|
|
1520
1508
|
* The function that will be called when the quest goes to the next stage.
|
|
1521
1509
|
*/
|
|
1522
1510
|
get onNextStage() {
|
|
1523
|
-
|
|
1524
|
-
if (onNext === void 0) {
|
|
1525
|
-
return void 0;
|
|
1526
|
-
}
|
|
1527
|
-
return (props) => onNext(this, props);
|
|
1511
|
+
return this._onNextStage;
|
|
1528
1512
|
}
|
|
1529
1513
|
/**
|
|
1530
1514
|
* Start the quest.
|
|
@@ -1543,7 +1527,7 @@ var Quest = class extends StoredClassModel {
|
|
|
1543
1527
|
this.currentStageIndex = 0;
|
|
1544
1528
|
let currentStage = this.currentStage;
|
|
1545
1529
|
if (currentStage && currentStage.start) {
|
|
1546
|
-
this.onStart && this.onStart(props);
|
|
1530
|
+
this.onStart && this.onStart(this, props);
|
|
1547
1531
|
return currentStage.start(props);
|
|
1548
1532
|
} else {
|
|
1549
1533
|
console.error(`[NQTR] Quest ${this.id} has no start stage`);
|
|
@@ -1609,9 +1593,9 @@ var Quest = class extends StoredClassModel {
|
|
|
1609
1593
|
return false;
|
|
1610
1594
|
}
|
|
1611
1595
|
this.currentStageIndex = currentStageIndex + 1;
|
|
1612
|
-
this.onNextStage && this.onNextStage(props);
|
|
1596
|
+
this.onNextStage && this.onNextStage(this, props);
|
|
1613
1597
|
if (prevStage && prevStage.onEnd) {
|
|
1614
|
-
prevStage.onEnd(props);
|
|
1598
|
+
prevStage.onEnd(prevStage, props);
|
|
1615
1599
|
}
|
|
1616
1600
|
let nextCurrentStage = this.currentStage;
|
|
1617
1601
|
if (nextCurrentStage) {
|