@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.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as ActivityModel, ActivityProps } from './classes/Activity.js';
|
|
2
|
-
export { C as CommitmentBaseModel, a as CommitmentBaseModelProps, L as LocationBaseModel, b as LocationBaseModelProps, M as MapBaseModel, c as MapBaseModelProps, R as RoomBaseModel, d as RoomBaseModelProps } from './index-
|
|
2
|
+
export { C as CommitmentBaseModel, a as CommitmentBaseModelProps, L as LocationBaseModel, b as LocationBaseModelProps, M as MapBaseModel, c as MapBaseModelProps, R as RoomBaseModel, d as RoomBaseModelProps } from './index-Cu7BBJil.js';
|
|
3
3
|
export { default as Goal, GoalProps } from './classes/quest/Goal.js';
|
|
4
4
|
export { Q as QuestBaseModel, a as QuestBaseModelProps, c as QuestsRequiredType, S as StageBaseModel, b as StageBaseModelProps } from './index-BjOzVDyw.js';
|
|
5
5
|
export { getActivityById, saveActivity } from './decorators/ActivityDecorator.js';
|
|
@@ -12,5 +12,6 @@ export { clearExpiredRoutine, getCommitmentByCharacter, getCurrentCommitments }
|
|
|
12
12
|
export { default as TimeManager } from './managers/TimeManager.js';
|
|
13
13
|
export { ITimeStlot, TimeSettings } from './types/TimeSettings.js';
|
|
14
14
|
import '@drincs/nqtr/dist/override';
|
|
15
|
-
import './
|
|
15
|
+
import './override/GraphicItem.js';
|
|
16
16
|
import '@drincs/pixi-vn';
|
|
17
|
+
import './override/OnRenderGraphicItemProps.js';
|
package/dist/index.js
CHANGED
|
@@ -275,8 +275,8 @@ var ActivityStoredAbstract = class {
|
|
|
275
275
|
this.defaultToDay = props.toDay;
|
|
276
276
|
this.defaultDisabled = props.disabled || false;
|
|
277
277
|
this.defaultHidden = props.hidden || false;
|
|
278
|
-
this.
|
|
279
|
-
this._onRun = onRun;
|
|
278
|
+
this._renderIcon = props.renderIcon;
|
|
279
|
+
this._onRun = (props2) => onRun(this, props2);
|
|
280
280
|
}
|
|
281
281
|
/**
|
|
282
282
|
* The name
|
|
@@ -359,16 +359,19 @@ var ActivityStoredAbstract = class {
|
|
|
359
359
|
this.setStorageProperty("hidden", value);
|
|
360
360
|
}
|
|
361
361
|
/**
|
|
362
|
-
* The icon
|
|
362
|
+
* The function for rendering the icon of the activity.
|
|
363
363
|
*/
|
|
364
|
-
get
|
|
365
|
-
|
|
364
|
+
get renderIcon() {
|
|
365
|
+
if (typeof this._renderIcon !== "function") {
|
|
366
|
+
return (props) => this._renderIcon;
|
|
367
|
+
}
|
|
368
|
+
return this._renderIcon;
|
|
366
369
|
}
|
|
367
370
|
/**
|
|
368
371
|
* The function that is called when the activity is runned.
|
|
369
372
|
*/
|
|
370
373
|
get onRun() {
|
|
371
|
-
return () => this._onRun(this);
|
|
374
|
+
return (props) => this._onRun(this, props);
|
|
372
375
|
}
|
|
373
376
|
/**
|
|
374
377
|
* Whether the activity is a deadline.
|
|
@@ -393,7 +396,7 @@ var ActivityStoredAbstract = class {
|
|
|
393
396
|
toDay: this.getStorageProperty("toDay") || this.defaultToDay,
|
|
394
397
|
disabled: this.getStorageProperty("disabled") || this.defaultDisabled,
|
|
395
398
|
hidden: this.getStorageProperty("hidden") || this.defaultHidden,
|
|
396
|
-
|
|
399
|
+
renderIcon: this._renderIcon
|
|
397
400
|
};
|
|
398
401
|
}
|
|
399
402
|
};
|
|
@@ -412,8 +415,8 @@ var ActivityModel = class {
|
|
|
412
415
|
this._toDay = props.toDay;
|
|
413
416
|
this._disabled = props.disabled || false;
|
|
414
417
|
this._hidden = props.hidden || false;
|
|
415
|
-
this.
|
|
416
|
-
this._onRun = onRun;
|
|
418
|
+
this._renderIcon = props.renderIcon;
|
|
419
|
+
this._onRun = (props2) => onRun(this, props2);
|
|
417
420
|
}
|
|
418
421
|
/**
|
|
419
422
|
* The activity id, that is unique.
|
|
@@ -476,16 +479,19 @@ var ActivityModel = class {
|
|
|
476
479
|
return this._hidden;
|
|
477
480
|
}
|
|
478
481
|
/**
|
|
479
|
-
* The icon
|
|
482
|
+
* The function for rendering the icon of the activity.
|
|
480
483
|
*/
|
|
481
|
-
get
|
|
482
|
-
|
|
484
|
+
get renderIcon() {
|
|
485
|
+
if (typeof this._renderIcon !== "function") {
|
|
486
|
+
return (props) => this._renderIcon;
|
|
487
|
+
}
|
|
488
|
+
return this._renderIcon;
|
|
483
489
|
}
|
|
484
490
|
/**
|
|
485
491
|
* The function that is called when the activity is runned.
|
|
486
492
|
*/
|
|
487
493
|
get onRun() {
|
|
488
|
-
return () => this._onRun(this);
|
|
494
|
+
return (props) => this._onRun(this, props);
|
|
489
495
|
}
|
|
490
496
|
/**
|
|
491
497
|
* Whether the activity is a deadline.
|
|
@@ -510,7 +516,7 @@ var ActivityModel = class {
|
|
|
510
516
|
toDay: this._toDay,
|
|
511
517
|
disabled: this._disabled,
|
|
512
518
|
hidden: this._hidden,
|
|
513
|
-
|
|
519
|
+
renderIcon: this._renderIcon
|
|
514
520
|
};
|
|
515
521
|
}
|
|
516
522
|
};
|
|
@@ -540,7 +546,7 @@ var CommitmentBaseModel = class extends pixiVn.StoredClassModel {
|
|
|
540
546
|
this.defaultToHour = props.toHour;
|
|
541
547
|
this.defaultFromDay = props.fromDay;
|
|
542
548
|
this.defaultToDay = props.toDay;
|
|
543
|
-
this.
|
|
549
|
+
this._renderImage = props.renderImage;
|
|
544
550
|
this._executionType = props.executionType || "interaction" /* INTERACTION */;
|
|
545
551
|
this._onRun = props.onRun;
|
|
546
552
|
this.defaultDisabled = props.disabled || false;
|
|
@@ -605,10 +611,13 @@ var CommitmentBaseModel = class extends pixiVn.StoredClassModel {
|
|
|
605
611
|
this.setStorageProperty("toDay", value);
|
|
606
612
|
}
|
|
607
613
|
/**
|
|
608
|
-
* The
|
|
614
|
+
* The function for rendering the image of the room.
|
|
609
615
|
*/
|
|
610
|
-
get
|
|
611
|
-
|
|
616
|
+
get renderImage() {
|
|
617
|
+
if (typeof this._renderImage !== "function") {
|
|
618
|
+
return (props) => this._renderImage;
|
|
619
|
+
}
|
|
620
|
+
return this._renderImage;
|
|
612
621
|
}
|
|
613
622
|
/**
|
|
614
623
|
* 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.
|
|
@@ -732,7 +741,7 @@ var LocationBaseModel = class extends pixiVn.StoredClassModel {
|
|
|
732
741
|
this.defaultName = props.name || "";
|
|
733
742
|
this.defaultDisabled = props.disabled || false;
|
|
734
743
|
this.defaultHidden = props.hidden || false;
|
|
735
|
-
this.
|
|
744
|
+
this._renderIcon = props.renderIcon;
|
|
736
745
|
this._map = map;
|
|
737
746
|
}
|
|
738
747
|
/**
|
|
@@ -772,10 +781,13 @@ var LocationBaseModel = class extends pixiVn.StoredClassModel {
|
|
|
772
781
|
this.setStorageProperty("hidden", value);
|
|
773
782
|
}
|
|
774
783
|
/**
|
|
775
|
-
* The
|
|
784
|
+
* The function for rendering the icon of the location.
|
|
776
785
|
*/
|
|
777
|
-
get
|
|
778
|
-
|
|
786
|
+
get renderIcon() {
|
|
787
|
+
if (typeof this._renderIcon !== "function") {
|
|
788
|
+
return (props) => this._renderIcon;
|
|
789
|
+
}
|
|
790
|
+
return this._renderIcon;
|
|
779
791
|
}
|
|
780
792
|
/**
|
|
781
793
|
* The map where the location is.
|
|
@@ -822,7 +834,7 @@ var MapBaseModel = class extends pixiVn.StoredClassModel {
|
|
|
822
834
|
constructor(id, props = {}) {
|
|
823
835
|
super(MAP_CATEGORY, id);
|
|
824
836
|
this.defaultName = props.name || "";
|
|
825
|
-
this.
|
|
837
|
+
this._renderImege = props.renderImage;
|
|
826
838
|
this.defaultDisabled = props.disabled || false;
|
|
827
839
|
this.defaultHidden = props.hidden || false;
|
|
828
840
|
}
|
|
@@ -837,14 +849,13 @@ var MapBaseModel = class extends pixiVn.StoredClassModel {
|
|
|
837
849
|
this.setStorageProperty("name", value);
|
|
838
850
|
}
|
|
839
851
|
/**
|
|
840
|
-
* The image of the map.
|
|
841
|
-
* If you set undefined, it will return the initial value of image.
|
|
852
|
+
* The function for rendering the image of the map.
|
|
842
853
|
*/
|
|
843
|
-
get
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
this.
|
|
854
|
+
get renderImage() {
|
|
855
|
+
if (typeof this._renderImege !== "function") {
|
|
856
|
+
return (props) => this._renderImege;
|
|
857
|
+
}
|
|
858
|
+
return this._renderImege;
|
|
848
859
|
}
|
|
849
860
|
/**
|
|
850
861
|
* Whether is disabled. If it is a string, it is a Pixi'VN flag name.
|
|
@@ -1095,11 +1106,11 @@ var RoomBaseModel = class extends pixiVn.StoredClassModel {
|
|
|
1095
1106
|
super(ROOM_CATEGORY, id);
|
|
1096
1107
|
this._location = location;
|
|
1097
1108
|
this.defaultName = props.name || "";
|
|
1098
|
-
this.
|
|
1109
|
+
this._renderImege = props.renderImage;
|
|
1099
1110
|
this.defaultActivityIds = ((_a = props.defaultActivities) == null ? void 0 : _a.map((activity) => activity.id)) || [];
|
|
1100
1111
|
this.defaultDisabled = props.disabled || false;
|
|
1101
1112
|
this.defaultHidden = props.hidden || false;
|
|
1102
|
-
this.
|
|
1113
|
+
this._renderIcon = props.renderIcon;
|
|
1103
1114
|
this._isEntrance = props.isEntrance;
|
|
1104
1115
|
}
|
|
1105
1116
|
/**
|
|
@@ -1125,14 +1136,13 @@ var RoomBaseModel = class extends pixiVn.StoredClassModel {
|
|
|
1125
1136
|
this.setStorageProperty("name", value);
|
|
1126
1137
|
}
|
|
1127
1138
|
/**
|
|
1128
|
-
* The
|
|
1129
|
-
* If you set undefined, it will return the initial value of image.
|
|
1139
|
+
* The function for rendering the image of the room.
|
|
1130
1140
|
*/
|
|
1131
|
-
get
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
this.
|
|
1141
|
+
get renderImage() {
|
|
1142
|
+
if (typeof this._renderImege !== "function") {
|
|
1143
|
+
return (props) => this._renderImege;
|
|
1144
|
+
}
|
|
1145
|
+
return this._renderImege;
|
|
1136
1146
|
}
|
|
1137
1147
|
/**
|
|
1138
1148
|
* The activities that are available in this room.
|
|
@@ -1289,8 +1299,14 @@ var RoomBaseModel = class extends pixiVn.StoredClassModel {
|
|
|
1289
1299
|
set hidden(value) {
|
|
1290
1300
|
this.setStorageProperty("hidden", value);
|
|
1291
1301
|
}
|
|
1292
|
-
|
|
1293
|
-
|
|
1302
|
+
/**
|
|
1303
|
+
* The function for rendering the icon of the room.
|
|
1304
|
+
*/
|
|
1305
|
+
get renderIcon() {
|
|
1306
|
+
if (typeof this._renderIcon !== "function") {
|
|
1307
|
+
return (props) => this._renderIcon;
|
|
1308
|
+
}
|
|
1309
|
+
return this._renderIcon;
|
|
1294
1310
|
}
|
|
1295
1311
|
/**
|
|
1296
1312
|
* Get the character commitments of the room.
|