@drincs/nqtr 0.1.4 → 0.1.6
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 +11 -10
- package/dist/classes/Activity.d.ts +11 -10
- package/dist/classes/Activity.js +20 -14
- package/dist/classes/Activity.js.map +1 -1
- package/dist/classes/Activity.mjs +20 -14
- 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 +7 -4
- package/dist/classes/Commitment.js.map +1 -1
- package/dist/classes/Commitment.mjs +7 -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 +17 -11
- package/dist/classes/index.js.map +1 -1
- package/dist/classes/index.mjs +17 -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 +10 -7
- package/dist/classes/navigation/ActivityRoom.js.map +1 -1
- package/dist/classes/navigation/ActivityRoom.mjs +10 -7
- 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 +7 -4
- package/dist/classes/navigation/Location.js.map +1 -1
- package/dist/classes/navigation/Location.mjs +7 -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 +7 -8
- package/dist/classes/navigation/Map.js.map +1 -1
- package/dist/classes/navigation/Map.mjs +7 -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 +26 -18
- package/dist/classes/navigation/Room.js.map +1 -1
- package/dist/classes/navigation/Room.mjs +26 -18
- 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 +40 -30
- package/dist/classes/navigation/index.js.map +1 -1
- package/dist/classes/navigation/index.mjs +40 -30
- 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 +7 -4
- package/dist/functions/NavigationFunctions.js.map +1 -1
- package/dist/functions/NavigationFunctions.mjs +7 -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 +7 -4
- package/dist/functions/index.js.map +1 -1
- package/dist/functions/index.mjs +7 -4
- package/dist/functions/index.mjs.map +1 -1
- package/dist/{index-Ci6Aw7YE.d.ts → index-Cu7BBJil.d.ts} +24 -27
- package/dist/{index-BvCfRbJB.d.mts → index-Lm3w4aIL.d.mts} +24 -27
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +57 -41
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +57 -41
- package/dist/index.mjs.map +1 -1
- package/dist/override/GraphicItem.d.mts +16 -0
- package/dist/override/GraphicItem.d.ts +16 -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 +1 -1
- package/dist/types/GraphicItem.d.mts +0 -5
- package/dist/types/GraphicItem.d.ts +0 -5
- /package/dist/{types → override}/GraphicItem.js +0 -0
- /package/dist/{types → override}/GraphicItem.js.map +0 -0
- /package/dist/{types → override}/GraphicItem.mjs +0 -0
- /package/dist/{types → override}/GraphicItem.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,16 +357,19 @@ 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
|
+
return this._renderIcon;
|
|
364
367
|
}
|
|
365
368
|
/**
|
|
366
369
|
* The function that is called when the activity is runned.
|
|
367
370
|
*/
|
|
368
371
|
get onRun() {
|
|
369
|
-
return () => this._onRun(this);
|
|
372
|
+
return (props) => this._onRun(this, props);
|
|
370
373
|
}
|
|
371
374
|
/**
|
|
372
375
|
* Whether the activity is a deadline.
|
|
@@ -391,7 +394,7 @@ var ActivityStoredAbstract = class {
|
|
|
391
394
|
toDay: this.getStorageProperty("toDay") || this.defaultToDay,
|
|
392
395
|
disabled: this.getStorageProperty("disabled") || this.defaultDisabled,
|
|
393
396
|
hidden: this.getStorageProperty("hidden") || this.defaultHidden,
|
|
394
|
-
|
|
397
|
+
renderIcon: this._renderIcon
|
|
395
398
|
};
|
|
396
399
|
}
|
|
397
400
|
};
|
|
@@ -410,8 +413,8 @@ var ActivityModel = class {
|
|
|
410
413
|
this._toDay = props.toDay;
|
|
411
414
|
this._disabled = props.disabled || false;
|
|
412
415
|
this._hidden = props.hidden || false;
|
|
413
|
-
this.
|
|
414
|
-
this._onRun = onRun;
|
|
416
|
+
this._renderIcon = props.renderIcon;
|
|
417
|
+
this._onRun = (props2) => onRun(this, props2);
|
|
415
418
|
}
|
|
416
419
|
/**
|
|
417
420
|
* The activity id, that is unique.
|
|
@@ -474,16 +477,19 @@ var ActivityModel = class {
|
|
|
474
477
|
return this._hidden;
|
|
475
478
|
}
|
|
476
479
|
/**
|
|
477
|
-
* The icon
|
|
480
|
+
* The function for rendering the icon of the activity.
|
|
478
481
|
*/
|
|
479
|
-
get
|
|
480
|
-
|
|
482
|
+
get renderIcon() {
|
|
483
|
+
if (typeof this._renderIcon !== "function") {
|
|
484
|
+
return (props) => this._renderIcon;
|
|
485
|
+
}
|
|
486
|
+
return this._renderIcon;
|
|
481
487
|
}
|
|
482
488
|
/**
|
|
483
489
|
* The function that is called when the activity is runned.
|
|
484
490
|
*/
|
|
485
491
|
get onRun() {
|
|
486
|
-
return () => this._onRun(this);
|
|
492
|
+
return (props) => this._onRun(this, props);
|
|
487
493
|
}
|
|
488
494
|
/**
|
|
489
495
|
* Whether the activity is a deadline.
|
|
@@ -508,7 +514,7 @@ var ActivityModel = class {
|
|
|
508
514
|
toDay: this._toDay,
|
|
509
515
|
disabled: this._disabled,
|
|
510
516
|
hidden: this._hidden,
|
|
511
|
-
|
|
517
|
+
renderIcon: this._renderIcon
|
|
512
518
|
};
|
|
513
519
|
}
|
|
514
520
|
};
|
|
@@ -538,7 +544,7 @@ var CommitmentBaseModel = class extends StoredClassModel {
|
|
|
538
544
|
this.defaultToHour = props.toHour;
|
|
539
545
|
this.defaultFromDay = props.fromDay;
|
|
540
546
|
this.defaultToDay = props.toDay;
|
|
541
|
-
this.
|
|
547
|
+
this._renderImage = props.renderImage;
|
|
542
548
|
this._executionType = props.executionType || "interaction" /* INTERACTION */;
|
|
543
549
|
this._onRun = props.onRun;
|
|
544
550
|
this.defaultDisabled = props.disabled || false;
|
|
@@ -603,10 +609,13 @@ var CommitmentBaseModel = class extends StoredClassModel {
|
|
|
603
609
|
this.setStorageProperty("toDay", value);
|
|
604
610
|
}
|
|
605
611
|
/**
|
|
606
|
-
* The
|
|
612
|
+
* The function for rendering the image of the room.
|
|
607
613
|
*/
|
|
608
|
-
get
|
|
609
|
-
|
|
614
|
+
get renderImage() {
|
|
615
|
+
if (typeof this._renderImage !== "function") {
|
|
616
|
+
return (props) => this._renderImage;
|
|
617
|
+
}
|
|
618
|
+
return this._renderImage;
|
|
610
619
|
}
|
|
611
620
|
/**
|
|
612
621
|
* 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 +739,7 @@ var LocationBaseModel = class extends StoredClassModel {
|
|
|
730
739
|
this.defaultName = props.name || "";
|
|
731
740
|
this.defaultDisabled = props.disabled || false;
|
|
732
741
|
this.defaultHidden = props.hidden || false;
|
|
733
|
-
this.
|
|
742
|
+
this._renderIcon = props.renderIcon;
|
|
734
743
|
this._map = map;
|
|
735
744
|
}
|
|
736
745
|
/**
|
|
@@ -770,10 +779,13 @@ var LocationBaseModel = class extends StoredClassModel {
|
|
|
770
779
|
this.setStorageProperty("hidden", value);
|
|
771
780
|
}
|
|
772
781
|
/**
|
|
773
|
-
* The
|
|
782
|
+
* The function for rendering the icon of the location.
|
|
774
783
|
*/
|
|
775
|
-
get
|
|
776
|
-
|
|
784
|
+
get renderIcon() {
|
|
785
|
+
if (typeof this._renderIcon !== "function") {
|
|
786
|
+
return (props) => this._renderIcon;
|
|
787
|
+
}
|
|
788
|
+
return this._renderIcon;
|
|
777
789
|
}
|
|
778
790
|
/**
|
|
779
791
|
* The map where the location is.
|
|
@@ -820,7 +832,7 @@ var MapBaseModel = class extends StoredClassModel {
|
|
|
820
832
|
constructor(id, props = {}) {
|
|
821
833
|
super(MAP_CATEGORY, id);
|
|
822
834
|
this.defaultName = props.name || "";
|
|
823
|
-
this.
|
|
835
|
+
this._renderImege = props.renderImage;
|
|
824
836
|
this.defaultDisabled = props.disabled || false;
|
|
825
837
|
this.defaultHidden = props.hidden || false;
|
|
826
838
|
}
|
|
@@ -835,14 +847,13 @@ var MapBaseModel = class extends StoredClassModel {
|
|
|
835
847
|
this.setStorageProperty("name", value);
|
|
836
848
|
}
|
|
837
849
|
/**
|
|
838
|
-
* The image of the map.
|
|
839
|
-
* If you set undefined, it will return the initial value of image.
|
|
850
|
+
* The function for rendering the image of the map.
|
|
840
851
|
*/
|
|
841
|
-
get
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
this.
|
|
852
|
+
get renderImage() {
|
|
853
|
+
if (typeof this._renderImege !== "function") {
|
|
854
|
+
return (props) => this._renderImege;
|
|
855
|
+
}
|
|
856
|
+
return this._renderImege;
|
|
846
857
|
}
|
|
847
858
|
/**
|
|
848
859
|
* Whether is disabled. If it is a string, it is a Pixi'VN flag name.
|
|
@@ -1093,11 +1104,11 @@ var RoomBaseModel = class extends StoredClassModel {
|
|
|
1093
1104
|
super(ROOM_CATEGORY, id);
|
|
1094
1105
|
this._location = location;
|
|
1095
1106
|
this.defaultName = props.name || "";
|
|
1096
|
-
this.
|
|
1107
|
+
this._renderImege = props.renderImage;
|
|
1097
1108
|
this.defaultActivityIds = ((_a = props.defaultActivities) == null ? void 0 : _a.map((activity) => activity.id)) || [];
|
|
1098
1109
|
this.defaultDisabled = props.disabled || false;
|
|
1099
1110
|
this.defaultHidden = props.hidden || false;
|
|
1100
|
-
this.
|
|
1111
|
+
this._renderIcon = props.renderIcon;
|
|
1101
1112
|
this._isEntrance = props.isEntrance;
|
|
1102
1113
|
}
|
|
1103
1114
|
/**
|
|
@@ -1123,14 +1134,13 @@ var RoomBaseModel = class extends StoredClassModel {
|
|
|
1123
1134
|
this.setStorageProperty("name", value);
|
|
1124
1135
|
}
|
|
1125
1136
|
/**
|
|
1126
|
-
* The
|
|
1127
|
-
* If you set undefined, it will return the initial value of image.
|
|
1137
|
+
* The function for rendering the image of the room.
|
|
1128
1138
|
*/
|
|
1129
|
-
get
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
this.
|
|
1139
|
+
get renderImage() {
|
|
1140
|
+
if (typeof this._renderImege !== "function") {
|
|
1141
|
+
return (props) => this._renderImege;
|
|
1142
|
+
}
|
|
1143
|
+
return this._renderImege;
|
|
1134
1144
|
}
|
|
1135
1145
|
/**
|
|
1136
1146
|
* The activities that are available in this room.
|
|
@@ -1287,8 +1297,14 @@ var RoomBaseModel = class extends StoredClassModel {
|
|
|
1287
1297
|
set hidden(value) {
|
|
1288
1298
|
this.setStorageProperty("hidden", value);
|
|
1289
1299
|
}
|
|
1290
|
-
|
|
1291
|
-
|
|
1300
|
+
/**
|
|
1301
|
+
* The function for rendering the icon of the room.
|
|
1302
|
+
*/
|
|
1303
|
+
get renderIcon() {
|
|
1304
|
+
if (typeof this._renderIcon !== "function") {
|
|
1305
|
+
return (props) => this._renderIcon;
|
|
1306
|
+
}
|
|
1307
|
+
return this._renderIcon;
|
|
1292
1308
|
}
|
|
1293
1309
|
/**
|
|
1294
1310
|
* Get the character commitments of the room.
|