@drincs/nqtr 0.1.5 → 0.1.7
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/classes/Activity.d.mts +10 -9
- package/dist/classes/Activity.d.ts +10 -9
- package/dist/classes/Activity.js +27 -13
- package/dist/classes/Activity.js.map +1 -1
- package/dist/classes/Activity.mjs +27 -13
- package/dist/classes/Activity.mjs.map +1 -1
- package/dist/classes/Commitment.d.mts +3 -2
- package/dist/classes/Commitment.d.ts +3 -2
- package/dist/classes/Commitment.js +11 -4
- package/dist/classes/Commitment.js.map +1 -1
- package/dist/classes/Commitment.mjs +11 -4
- package/dist/classes/Commitment.mjs.map +1 -1
- package/dist/classes/index.d.mts +3 -2
- package/dist/classes/index.d.ts +3 -2
- package/dist/classes/index.js +25 -11
- package/dist/classes/index.js.map +1 -1
- package/dist/classes/index.mjs +25 -11
- package/dist/classes/index.mjs.map +1 -1
- package/dist/classes/navigation/ActivityRoom.d.mts +3 -2
- package/dist/classes/navigation/ActivityRoom.d.ts +3 -2
- package/dist/classes/navigation/ActivityRoom.js +13 -6
- package/dist/classes/navigation/ActivityRoom.js.map +1 -1
- package/dist/classes/navigation/ActivityRoom.mjs +13 -6
- package/dist/classes/navigation/ActivityRoom.mjs.map +1 -1
- package/dist/classes/navigation/Location.d.mts +3 -2
- package/dist/classes/navigation/Location.d.ts +3 -2
- package/dist/classes/navigation/Location.js +11 -4
- package/dist/classes/navigation/Location.js.map +1 -1
- package/dist/classes/navigation/Location.mjs +11 -4
- package/dist/classes/navigation/Location.mjs.map +1 -1
- package/dist/classes/navigation/Map.d.mts +3 -2
- package/dist/classes/navigation/Map.d.ts +3 -2
- package/dist/classes/navigation/Map.js +11 -8
- package/dist/classes/navigation/Map.js.map +1 -1
- package/dist/classes/navigation/Map.mjs +11 -8
- package/dist/classes/navigation/Map.mjs.map +1 -1
- package/dist/classes/navigation/Room.d.mts +3 -2
- package/dist/classes/navigation/Room.d.ts +3 -2
- package/dist/classes/navigation/Room.js +37 -17
- package/dist/classes/navigation/Room.js.map +1 -1
- package/dist/classes/navigation/Room.mjs +37 -17
- package/dist/classes/navigation/Room.mjs.map +1 -1
- package/dist/classes/navigation/index.d.mts +3 -2
- package/dist/classes/navigation/index.d.ts +3 -2
- package/dist/classes/navigation/index.js +59 -29
- package/dist/classes/navigation/index.js.map +1 -1
- package/dist/classes/navigation/index.mjs +59 -29
- package/dist/classes/navigation/index.mjs.map +1 -1
- package/dist/decorators/ActivityDecorator.d.mts +2 -1
- package/dist/decorators/ActivityDecorator.d.ts +2 -1
- package/dist/decorators/CommitmentDecorator.d.mts +3 -2
- package/dist/decorators/CommitmentDecorator.d.ts +3 -2
- package/dist/decorators/RoomDecorator.d.mts +3 -2
- package/dist/decorators/RoomDecorator.d.ts +3 -2
- package/dist/decorators/index.d.mts +3 -2
- package/dist/decorators/index.d.ts +3 -2
- package/dist/functions/ActivityFunctions.d.mts +3 -2
- package/dist/functions/ActivityFunctions.d.ts +3 -2
- package/dist/functions/ActivityFunctions.js.map +1 -1
- package/dist/functions/ActivityFunctions.mjs.map +1 -1
- package/dist/functions/NavigationFunctions.d.mts +3 -2
- package/dist/functions/NavigationFunctions.d.ts +3 -2
- package/dist/functions/NavigationFunctions.js +11 -4
- package/dist/functions/NavigationFunctions.js.map +1 -1
- package/dist/functions/NavigationFunctions.mjs +11 -4
- package/dist/functions/NavigationFunctions.mjs.map +1 -1
- package/dist/functions/RoutineFunctions.d.mts +3 -2
- package/dist/functions/RoutineFunctions.d.ts +3 -2
- package/dist/functions/index.d.mts +3 -2
- package/dist/functions/index.d.ts +3 -2
- package/dist/functions/index.js +11 -4
- package/dist/functions/index.js.map +1 -1
- package/dist/functions/index.mjs +11 -4
- package/dist/functions/index.mjs.map +1 -1
- package/dist/{index-BvCfRbJB.d.mts → index-CwqgrVp6.d.mts} +30 -33
- package/dist/{index-Ci6Aw7YE.d.ts → index-D_4poX-_.d.ts} +30 -33
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +84 -40
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +84 -40
- package/dist/index.mjs.map +1 -1
- package/dist/override/GraphicItemType.d.mts +16 -0
- package/dist/override/GraphicItemType.d.ts +16 -0
- package/dist/{types/GraphicItem.js → override/GraphicItemType.js} +1 -1
- package/dist/override/GraphicItemType.mjs +3 -0
- package/dist/override/OnRenderGraphicItemProps.d.mts +19 -0
- package/dist/override/OnRenderGraphicItemProps.d.ts +19 -0
- package/dist/override/OnRenderGraphicItemProps.js +4 -0
- package/dist/override/OnRenderGraphicItemProps.js.map +1 -0
- package/dist/override/OnRenderGraphicItemProps.mjs +3 -0
- package/dist/override/OnRenderGraphicItemProps.mjs.map +1 -0
- package/dist/override/index.d.mts +3 -0
- package/dist/override/index.d.ts +3 -0
- package/package.json +2 -2
- package/dist/types/GraphicItem.d.mts +0 -5
- package/dist/types/GraphicItem.d.ts +0 -5
- package/dist/types/GraphicItem.mjs +0 -3
- /package/dist/{types/GraphicItem.js.map → override/GraphicItemType.js.map} +0 -0
- /package/dist/{types/GraphicItem.mjs.map → override/GraphicItemType.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -273,8 +273,8 @@ var ActivityStoredAbstract = class {
|
|
|
273
273
|
this.defaultToDay = props.toDay;
|
|
274
274
|
this.defaultDisabled = props.disabled || false;
|
|
275
275
|
this.defaultHidden = props.hidden || false;
|
|
276
|
-
this.
|
|
277
|
-
this._onRun = onRun;
|
|
276
|
+
this._renderIcon = props.renderIcon;
|
|
277
|
+
this._onRun = (props2) => onRun(this, props2);
|
|
278
278
|
}
|
|
279
279
|
/**
|
|
280
280
|
* The name
|
|
@@ -357,10 +357,17 @@ var ActivityStoredAbstract = class {
|
|
|
357
357
|
this.setStorageProperty("hidden", value);
|
|
358
358
|
}
|
|
359
359
|
/**
|
|
360
|
-
* The icon
|
|
360
|
+
* The function for rendering the icon of the activity.
|
|
361
361
|
*/
|
|
362
|
-
get
|
|
363
|
-
|
|
362
|
+
get renderIcon() {
|
|
363
|
+
if (typeof this._renderIcon !== "function") {
|
|
364
|
+
return (props) => this._renderIcon;
|
|
365
|
+
}
|
|
366
|
+
if (this._renderIcon !== void 0) {
|
|
367
|
+
return (props) => {
|
|
368
|
+
return this._renderIcon(this, props);
|
|
369
|
+
};
|
|
370
|
+
}
|
|
364
371
|
}
|
|
365
372
|
/**
|
|
366
373
|
* The function that is called when the activity is runned.
|
|
@@ -391,7 +398,7 @@ var ActivityStoredAbstract = class {
|
|
|
391
398
|
toDay: this.getStorageProperty("toDay") || this.defaultToDay,
|
|
392
399
|
disabled: this.getStorageProperty("disabled") || this.defaultDisabled,
|
|
393
400
|
hidden: this.getStorageProperty("hidden") || this.defaultHidden,
|
|
394
|
-
|
|
401
|
+
renderIcon: this._renderIcon
|
|
395
402
|
};
|
|
396
403
|
}
|
|
397
404
|
};
|
|
@@ -410,8 +417,8 @@ var ActivityModel = class {
|
|
|
410
417
|
this._toDay = props.toDay;
|
|
411
418
|
this._disabled = props.disabled || false;
|
|
412
419
|
this._hidden = props.hidden || false;
|
|
413
|
-
this.
|
|
414
|
-
this._onRun = onRun;
|
|
420
|
+
this._renderIcon = props.renderIcon;
|
|
421
|
+
this._onRun = (props2) => onRun(this, props2);
|
|
415
422
|
}
|
|
416
423
|
/**
|
|
417
424
|
* The activity id, that is unique.
|
|
@@ -474,16 +481,23 @@ var ActivityModel = class {
|
|
|
474
481
|
return this._hidden;
|
|
475
482
|
}
|
|
476
483
|
/**
|
|
477
|
-
* The icon
|
|
484
|
+
* The function for rendering the icon of the activity.
|
|
478
485
|
*/
|
|
479
|
-
get
|
|
480
|
-
|
|
486
|
+
get renderIcon() {
|
|
487
|
+
if (typeof this._renderIcon !== "function") {
|
|
488
|
+
return (props) => this._renderIcon;
|
|
489
|
+
}
|
|
490
|
+
if (this._renderIcon !== void 0) {
|
|
491
|
+
return (props) => {
|
|
492
|
+
return this._renderIcon(this, props);
|
|
493
|
+
};
|
|
494
|
+
}
|
|
481
495
|
}
|
|
482
496
|
/**
|
|
483
497
|
* The function that is called when the activity is runned.
|
|
484
498
|
*/
|
|
485
499
|
get onRun() {
|
|
486
|
-
return () => this._onRun(this);
|
|
500
|
+
return (props) => this._onRun(this, props);
|
|
487
501
|
}
|
|
488
502
|
/**
|
|
489
503
|
* Whether the activity is a deadline.
|
|
@@ -508,7 +522,7 @@ var ActivityModel = class {
|
|
|
508
522
|
toDay: this._toDay,
|
|
509
523
|
disabled: this._disabled,
|
|
510
524
|
hidden: this._hidden,
|
|
511
|
-
|
|
525
|
+
renderIcon: this._renderIcon
|
|
512
526
|
};
|
|
513
527
|
}
|
|
514
528
|
};
|
|
@@ -538,7 +552,7 @@ var CommitmentBaseModel = class extends StoredClassModel {
|
|
|
538
552
|
this.defaultToHour = props.toHour;
|
|
539
553
|
this.defaultFromDay = props.fromDay;
|
|
540
554
|
this.defaultToDay = props.toDay;
|
|
541
|
-
this.
|
|
555
|
+
this._renderImage = props.renderImage;
|
|
542
556
|
this._executionType = props.executionType || "interaction" /* INTERACTION */;
|
|
543
557
|
this._onRun = props.onRun;
|
|
544
558
|
this.defaultDisabled = props.disabled || false;
|
|
@@ -603,10 +617,17 @@ var CommitmentBaseModel = class extends StoredClassModel {
|
|
|
603
617
|
this.setStorageProperty("toDay", value);
|
|
604
618
|
}
|
|
605
619
|
/**
|
|
606
|
-
* The
|
|
620
|
+
* The function for rendering the image of the room.
|
|
607
621
|
*/
|
|
608
|
-
get
|
|
609
|
-
|
|
622
|
+
get renderImage() {
|
|
623
|
+
if (typeof this._renderImage !== "function") {
|
|
624
|
+
return (props) => this._renderImage;
|
|
625
|
+
}
|
|
626
|
+
if (this.renderImage !== void 0) {
|
|
627
|
+
return (props) => {
|
|
628
|
+
return this.renderImage(this, props);
|
|
629
|
+
};
|
|
630
|
+
}
|
|
610
631
|
}
|
|
611
632
|
/**
|
|
612
633
|
* Execution type. If is "automatic" the onRun() runned automatically when the palayer is in the room. If is "interaction" the player must interact with the character to run the onRun() function.
|
|
@@ -730,7 +751,7 @@ var LocationBaseModel = class extends StoredClassModel {
|
|
|
730
751
|
this.defaultName = props.name || "";
|
|
731
752
|
this.defaultDisabled = props.disabled || false;
|
|
732
753
|
this.defaultHidden = props.hidden || false;
|
|
733
|
-
this.
|
|
754
|
+
this._renderIcon = props.renderIcon;
|
|
734
755
|
this._map = map;
|
|
735
756
|
}
|
|
736
757
|
/**
|
|
@@ -770,10 +791,17 @@ var LocationBaseModel = class extends StoredClassModel {
|
|
|
770
791
|
this.setStorageProperty("hidden", value);
|
|
771
792
|
}
|
|
772
793
|
/**
|
|
773
|
-
* The
|
|
794
|
+
* The function for rendering the icon of the location.
|
|
774
795
|
*/
|
|
775
|
-
get
|
|
776
|
-
|
|
796
|
+
get renderIcon() {
|
|
797
|
+
if (typeof this._renderIcon !== "function") {
|
|
798
|
+
return (props) => this._renderIcon;
|
|
799
|
+
}
|
|
800
|
+
if (this._renderIcon !== void 0) {
|
|
801
|
+
return (props) => {
|
|
802
|
+
return this._renderIcon(this, props);
|
|
803
|
+
};
|
|
804
|
+
}
|
|
777
805
|
}
|
|
778
806
|
/**
|
|
779
807
|
* The map where the location is.
|
|
@@ -820,7 +848,7 @@ var MapBaseModel = class extends StoredClassModel {
|
|
|
820
848
|
constructor(id, props = {}) {
|
|
821
849
|
super(MAP_CATEGORY, id);
|
|
822
850
|
this.defaultName = props.name || "";
|
|
823
|
-
this.
|
|
851
|
+
this._renderImage = props.renderImage;
|
|
824
852
|
this.defaultDisabled = props.disabled || false;
|
|
825
853
|
this.defaultHidden = props.hidden || false;
|
|
826
854
|
}
|
|
@@ -835,14 +863,17 @@ var MapBaseModel = class extends StoredClassModel {
|
|
|
835
863
|
this.setStorageProperty("name", value);
|
|
836
864
|
}
|
|
837
865
|
/**
|
|
838
|
-
* The image of the map.
|
|
839
|
-
* If you set undefined, it will return the initial value of image.
|
|
866
|
+
* The function for rendering the image of the map.
|
|
840
867
|
*/
|
|
841
|
-
get
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
this.
|
|
868
|
+
get renderImage() {
|
|
869
|
+
if (typeof this._renderImage !== "function") {
|
|
870
|
+
return (props) => this._renderImage;
|
|
871
|
+
}
|
|
872
|
+
if (this.renderImage !== void 0) {
|
|
873
|
+
return (props) => {
|
|
874
|
+
return this.renderImage(this, props);
|
|
875
|
+
};
|
|
876
|
+
}
|
|
846
877
|
}
|
|
847
878
|
/**
|
|
848
879
|
* Whether is disabled. If it is a string, it is a Pixi'VN flag name.
|
|
@@ -1093,11 +1124,11 @@ var RoomBaseModel = class extends StoredClassModel {
|
|
|
1093
1124
|
super(ROOM_CATEGORY, id);
|
|
1094
1125
|
this._location = location;
|
|
1095
1126
|
this.defaultName = props.name || "";
|
|
1096
|
-
this.
|
|
1127
|
+
this._renderImage = props.renderImage;
|
|
1097
1128
|
this.defaultActivityIds = ((_a = props.defaultActivities) == null ? void 0 : _a.map((activity) => activity.id)) || [];
|
|
1098
1129
|
this.defaultDisabled = props.disabled || false;
|
|
1099
1130
|
this.defaultHidden = props.hidden || false;
|
|
1100
|
-
this.
|
|
1131
|
+
this._renderIcon = props.renderIcon;
|
|
1101
1132
|
this._isEntrance = props.isEntrance;
|
|
1102
1133
|
}
|
|
1103
1134
|
/**
|
|
@@ -1123,14 +1154,17 @@ var RoomBaseModel = class extends StoredClassModel {
|
|
|
1123
1154
|
this.setStorageProperty("name", value);
|
|
1124
1155
|
}
|
|
1125
1156
|
/**
|
|
1126
|
-
* The
|
|
1127
|
-
* If you set undefined, it will return the initial value of image.
|
|
1157
|
+
* The function for rendering the image of the room.
|
|
1128
1158
|
*/
|
|
1129
|
-
get
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
this.
|
|
1159
|
+
get renderImage() {
|
|
1160
|
+
if (typeof this._renderImage !== "function") {
|
|
1161
|
+
return (props) => this._renderImage;
|
|
1162
|
+
}
|
|
1163
|
+
if (this.renderImage !== void 0) {
|
|
1164
|
+
return (props) => {
|
|
1165
|
+
return this.renderImage(this, props);
|
|
1166
|
+
};
|
|
1167
|
+
}
|
|
1134
1168
|
}
|
|
1135
1169
|
/**
|
|
1136
1170
|
* The activities that are available in this room.
|
|
@@ -1287,8 +1321,18 @@ var RoomBaseModel = class extends StoredClassModel {
|
|
|
1287
1321
|
set hidden(value) {
|
|
1288
1322
|
this.setStorageProperty("hidden", value);
|
|
1289
1323
|
}
|
|
1290
|
-
|
|
1291
|
-
|
|
1324
|
+
/**
|
|
1325
|
+
* The function for rendering the icon of the room.
|
|
1326
|
+
*/
|
|
1327
|
+
get renderIcon() {
|
|
1328
|
+
if (typeof this._renderIcon !== "function") {
|
|
1329
|
+
return (props) => this._renderIcon;
|
|
1330
|
+
}
|
|
1331
|
+
if (this._renderIcon !== void 0) {
|
|
1332
|
+
return (props) => {
|
|
1333
|
+
return this._renderIcon(this, props);
|
|
1334
|
+
};
|
|
1335
|
+
}
|
|
1292
1336
|
}
|
|
1293
1337
|
/**
|
|
1294
1338
|
* Get the character commitments of the room.
|