@drincs/nqtr 0.1.6 → 0.1.8

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.
Files changed (92) hide show
  1. package/dist/classes/Activity.d.mts +4 -7
  2. package/dist/classes/Activity.d.ts +4 -7
  3. package/dist/classes/Activity.js +10 -2
  4. package/dist/classes/Activity.js.map +1 -1
  5. package/dist/classes/Activity.mjs +10 -2
  6. package/dist/classes/Activity.mjs.map +1 -1
  7. package/dist/classes/Commitment.d.mts +2 -4
  8. package/dist/classes/Commitment.d.ts +2 -4
  9. package/dist/classes/Commitment.js +5 -1
  10. package/dist/classes/Commitment.js.map +1 -1
  11. package/dist/classes/Commitment.mjs +5 -1
  12. package/dist/classes/Commitment.mjs.map +1 -1
  13. package/dist/classes/index.d.mts +1 -3
  14. package/dist/classes/index.d.ts +1 -3
  15. package/dist/classes/index.js +10 -2
  16. package/dist/classes/index.js.map +1 -1
  17. package/dist/classes/index.mjs +10 -2
  18. package/dist/classes/index.mjs.map +1 -1
  19. package/dist/classes/navigation/ActivityRoom.d.mts +1 -3
  20. package/dist/classes/navigation/ActivityRoom.d.ts +1 -3
  21. package/dist/classes/navigation/ActivityRoom.js +5 -1
  22. package/dist/classes/navigation/ActivityRoom.js.map +1 -1
  23. package/dist/classes/navigation/ActivityRoom.mjs +5 -1
  24. package/dist/classes/navigation/ActivityRoom.mjs.map +1 -1
  25. package/dist/classes/navigation/Location.d.mts +2 -4
  26. package/dist/classes/navigation/Location.d.ts +2 -4
  27. package/dist/classes/navigation/Location.js +5 -1
  28. package/dist/classes/navigation/Location.js.map +1 -1
  29. package/dist/classes/navigation/Location.mjs +5 -1
  30. package/dist/classes/navigation/Location.mjs.map +1 -1
  31. package/dist/classes/navigation/Map.d.mts +2 -4
  32. package/dist/classes/navigation/Map.d.ts +2 -4
  33. package/dist/classes/navigation/Map.js +8 -4
  34. package/dist/classes/navigation/Map.js.map +1 -1
  35. package/dist/classes/navigation/Map.mjs +8 -4
  36. package/dist/classes/navigation/Map.mjs.map +1 -1
  37. package/dist/classes/navigation/Room.d.mts +2 -4
  38. package/dist/classes/navigation/Room.d.ts +2 -4
  39. package/dist/classes/navigation/Room.js +18 -6
  40. package/dist/classes/navigation/Room.js.map +1 -1
  41. package/dist/classes/navigation/Room.mjs +18 -6
  42. package/dist/classes/navigation/Room.mjs.map +1 -1
  43. package/dist/classes/navigation/index.d.mts +1 -3
  44. package/dist/classes/navigation/index.d.ts +1 -3
  45. package/dist/classes/navigation/index.js +31 -11
  46. package/dist/classes/navigation/index.js.map +1 -1
  47. package/dist/classes/navigation/index.mjs +31 -11
  48. package/dist/classes/navigation/index.mjs.map +1 -1
  49. package/dist/decorators/ActivityDecorator.d.mts +0 -3
  50. package/dist/decorators/ActivityDecorator.d.ts +0 -3
  51. package/dist/decorators/CommitmentDecorator.d.mts +1 -3
  52. package/dist/decorators/CommitmentDecorator.d.ts +1 -3
  53. package/dist/decorators/RoomDecorator.d.mts +1 -3
  54. package/dist/decorators/RoomDecorator.d.ts +1 -3
  55. package/dist/decorators/index.d.mts +1 -3
  56. package/dist/decorators/index.d.ts +1 -3
  57. package/dist/functions/ActivityFunctions.d.mts +1 -3
  58. package/dist/functions/ActivityFunctions.d.ts +1 -3
  59. package/dist/functions/ActivityFunctions.js.map +1 -1
  60. package/dist/functions/ActivityFunctions.mjs.map +1 -1
  61. package/dist/functions/NavigationFunctions.d.mts +1 -3
  62. package/dist/functions/NavigationFunctions.d.ts +1 -3
  63. package/dist/functions/NavigationFunctions.js +5 -1
  64. package/dist/functions/NavigationFunctions.js.map +1 -1
  65. package/dist/functions/NavigationFunctions.mjs +5 -1
  66. package/dist/functions/NavigationFunctions.mjs.map +1 -1
  67. package/dist/functions/RoutineFunctions.d.mts +1 -3
  68. package/dist/functions/RoutineFunctions.d.ts +1 -3
  69. package/dist/functions/index.d.mts +1 -3
  70. package/dist/functions/index.d.ts +1 -3
  71. package/dist/functions/index.js +5 -1
  72. package/dist/functions/index.js.map +1 -1
  73. package/dist/functions/index.mjs +5 -1
  74. package/dist/functions/index.mjs.map +1 -1
  75. package/dist/{index-Cu7BBJil.d.ts → index-Cu8ZAiqF.d.ts} +19 -20
  76. package/dist/{index-Lm3w4aIL.d.mts → index-DhsRZJ3g.d.mts} +19 -20
  77. package/dist/index.d.mts +1 -3
  78. package/dist/index.d.ts +1 -3
  79. package/dist/index.js +41 -13
  80. package/dist/index.js.map +1 -1
  81. package/dist/index.mjs +41 -13
  82. package/dist/index.mjs.map +1 -1
  83. package/dist/override/{GraphicItem.js → GraphicItemType.js} +1 -1
  84. package/dist/override/GraphicItemType.mjs +3 -0
  85. package/dist/override/index.d.mts +1 -1
  86. package/dist/override/index.d.ts +1 -1
  87. package/package.json +2 -2
  88. package/dist/override/GraphicItem.mjs +0 -3
  89. /package/dist/override/{GraphicItem.d.mts → GraphicItemType.d.mts} +0 -0
  90. /package/dist/override/{GraphicItem.d.ts → GraphicItemType.d.ts} +0 -0
  91. /package/dist/override/{GraphicItem.js.map → GraphicItemType.js.map} +0 -0
  92. /package/dist/override/{GraphicItem.mjs.map → GraphicItemType.mjs.map} +0 -0
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { default as ActivityModel, ActivityProps } from './classes/Activity.mjs';
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-Lm3w4aIL.mjs';
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-DhsRZJ3g.mjs';
3
3
  export { default as Goal, GoalProps } from './classes/quest/Goal.mjs';
4
4
  export { Q as QuestBaseModel, a as QuestBaseModelProps, c as QuestsRequiredType, S as StageBaseModel, b as StageBaseModelProps } from './index-gJ26gdgL.mjs';
5
5
  export { getActivityById, saveActivity } from './decorators/ActivityDecorator.mjs';
@@ -12,6 +12,4 @@ export { clearExpiredRoutine, getCommitmentByCharacter, getCurrentCommitments }
12
12
  export { default as TimeManager } from './managers/TimeManager.mjs';
13
13
  export { ITimeStlot, TimeSettings } from './types/TimeSettings.mjs';
14
14
  import '@drincs/nqtr/dist/override';
15
- import './override/GraphicItem.mjs';
16
15
  import '@drincs/pixi-vn';
17
- import './override/OnRenderGraphicItemProps.mjs';
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-Cu7BBJil.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-Cu8ZAiqF.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,6 +12,4 @@ 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 './override/GraphicItem.js';
16
15
  import '@drincs/pixi-vn';
17
- import './override/OnRenderGraphicItemProps.js';
package/dist/index.js CHANGED
@@ -365,7 +365,11 @@ var ActivityStoredAbstract = class {
365
365
  if (typeof this._renderIcon !== "function") {
366
366
  return (props) => this._renderIcon;
367
367
  }
368
- return this._renderIcon;
368
+ if (this._renderIcon !== void 0) {
369
+ return (props) => {
370
+ return this._renderIcon(this, props);
371
+ };
372
+ }
369
373
  }
370
374
  /**
371
375
  * The function that is called when the activity is runned.
@@ -485,7 +489,11 @@ var ActivityModel = class {
485
489
  if (typeof this._renderIcon !== "function") {
486
490
  return (props) => this._renderIcon;
487
491
  }
488
- return this._renderIcon;
492
+ if (this._renderIcon !== void 0) {
493
+ return (props) => {
494
+ return this._renderIcon(this, props);
495
+ };
496
+ }
489
497
  }
490
498
  /**
491
499
  * The function that is called when the activity is runned.
@@ -617,7 +625,11 @@ var CommitmentBaseModel = class extends pixiVn.StoredClassModel {
617
625
  if (typeof this._renderImage !== "function") {
618
626
  return (props) => this._renderImage;
619
627
  }
620
- return this._renderImage;
628
+ if (this.renderImage !== void 0) {
629
+ return (props) => {
630
+ return this.renderImage(this, props);
631
+ };
632
+ }
621
633
  }
622
634
  /**
623
635
  * 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.
@@ -787,7 +799,11 @@ var LocationBaseModel = class extends pixiVn.StoredClassModel {
787
799
  if (typeof this._renderIcon !== "function") {
788
800
  return (props) => this._renderIcon;
789
801
  }
790
- return this._renderIcon;
802
+ if (this._renderIcon !== void 0) {
803
+ return (props) => {
804
+ return this._renderIcon(this, props);
805
+ };
806
+ }
791
807
  }
792
808
  /**
793
809
  * The map where the location is.
@@ -834,7 +850,7 @@ var MapBaseModel = class extends pixiVn.StoredClassModel {
834
850
  constructor(id, props = {}) {
835
851
  super(MAP_CATEGORY, id);
836
852
  this.defaultName = props.name || "";
837
- this._renderImege = props.renderImage;
853
+ this._renderImage = props.renderImage;
838
854
  this.defaultDisabled = props.disabled || false;
839
855
  this.defaultHidden = props.hidden || false;
840
856
  }
@@ -852,10 +868,14 @@ var MapBaseModel = class extends pixiVn.StoredClassModel {
852
868
  * The function for rendering the image of the map.
853
869
  */
854
870
  get renderImage() {
855
- if (typeof this._renderImege !== "function") {
856
- return (props) => this._renderImege;
871
+ if (typeof this._renderImage !== "function") {
872
+ return (props) => this._renderImage;
873
+ }
874
+ if (this.renderImage !== void 0) {
875
+ return (props) => {
876
+ return this.renderImage(this, props);
877
+ };
857
878
  }
858
- return this._renderImege;
859
879
  }
860
880
  /**
861
881
  * Whether is disabled. If it is a string, it is a Pixi'VN flag name.
@@ -1106,7 +1126,7 @@ var RoomBaseModel = class extends pixiVn.StoredClassModel {
1106
1126
  super(ROOM_CATEGORY, id);
1107
1127
  this._location = location;
1108
1128
  this.defaultName = props.name || "";
1109
- this._renderImege = props.renderImage;
1129
+ this._renderImage = props.renderImage;
1110
1130
  this.defaultActivityIds = ((_a = props.defaultActivities) == null ? void 0 : _a.map((activity) => activity.id)) || [];
1111
1131
  this.defaultDisabled = props.disabled || false;
1112
1132
  this.defaultHidden = props.hidden || false;
@@ -1139,10 +1159,14 @@ var RoomBaseModel = class extends pixiVn.StoredClassModel {
1139
1159
  * The function for rendering the image of the room.
1140
1160
  */
1141
1161
  get renderImage() {
1142
- if (typeof this._renderImege !== "function") {
1143
- return (props) => this._renderImege;
1162
+ if (typeof this._renderImage !== "function") {
1163
+ return (props) => this._renderImage;
1164
+ }
1165
+ if (this.renderImage !== void 0) {
1166
+ return (props) => {
1167
+ return this.renderImage(this, props);
1168
+ };
1144
1169
  }
1145
- return this._renderImege;
1146
1170
  }
1147
1171
  /**
1148
1172
  * The activities that are available in this room.
@@ -1306,7 +1330,11 @@ var RoomBaseModel = class extends pixiVn.StoredClassModel {
1306
1330
  if (typeof this._renderIcon !== "function") {
1307
1331
  return (props) => this._renderIcon;
1308
1332
  }
1309
- return this._renderIcon;
1333
+ if (this._renderIcon !== void 0) {
1334
+ return (props) => {
1335
+ return this._renderIcon(this, props);
1336
+ };
1337
+ }
1310
1338
  }
1311
1339
  /**
1312
1340
  * Get the character commitments of the room.