@drincs/nqtr 0.0.6 → 0.0.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.
- package/dist/index.d.mts +17 -32
- package/dist/index.d.ts +17 -32
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -132,9 +132,7 @@ interface MapBaseModelProps<TMap extends MapBaseModel = MapBaseModel> {
|
|
|
132
132
|
* ```
|
|
133
133
|
* @default undefined
|
|
134
134
|
*/
|
|
135
|
-
image?: GraphicItemType |
|
|
136
|
-
[key: string]: GraphicItemType;
|
|
137
|
-
};
|
|
135
|
+
image?: GraphicItemType | Record<any, GraphicItemType> | object;
|
|
138
136
|
/**
|
|
139
137
|
* The neighboring maps that are available in this map.
|
|
140
138
|
* @example
|
|
@@ -196,12 +194,8 @@ declare class MapBaseModel extends StoredClassModel {
|
|
|
196
194
|
* The image of the map. It can be a string, an Element or a Pixi'VN Canvas Item.
|
|
197
195
|
* If you set undefined, it will return the initial value of image.
|
|
198
196
|
*/
|
|
199
|
-
get image(): GraphicItemType |
|
|
200
|
-
|
|
201
|
-
} | undefined;
|
|
202
|
-
set image(value: GraphicItemType | {
|
|
203
|
-
[key: string]: GraphicItemType;
|
|
204
|
-
} | undefined);
|
|
197
|
+
get image(): GraphicItemType | Record<any, GraphicItemType> | object | undefined;
|
|
198
|
+
set image(value: GraphicItemType | Record<any, GraphicItemType> | object | undefined);
|
|
205
199
|
private defaultDisabled;
|
|
206
200
|
/**
|
|
207
201
|
* Whether is disabled. If it is a string, it is a Pixi'VN flag name.
|
|
@@ -262,9 +256,7 @@ interface RoomBaseModelProps {
|
|
|
262
256
|
* ```
|
|
263
257
|
* @default undefined
|
|
264
258
|
*/
|
|
265
|
-
image?: GraphicItemType |
|
|
266
|
-
[key: string]: GraphicItemType;
|
|
267
|
-
};
|
|
259
|
+
image?: GraphicItemType | Record<any, GraphicItemType> | object;
|
|
268
260
|
/**
|
|
269
261
|
* The activities that are available in this room.
|
|
270
262
|
* @default []
|
|
@@ -334,12 +326,8 @@ declare class RoomBaseModel<TLocation extends LocationBaseModel = LocationBaseMo
|
|
|
334
326
|
* The image. It can be a string, an Element or a Pixi'VN Canvas Item.
|
|
335
327
|
* If you set undefined, it will return the initial value of image.
|
|
336
328
|
*/
|
|
337
|
-
get image(): GraphicItemType |
|
|
338
|
-
|
|
339
|
-
} | undefined;
|
|
340
|
-
set image(value: GraphicItemType | {
|
|
341
|
-
[key: string]: GraphicItemType;
|
|
342
|
-
} | undefined);
|
|
329
|
+
get image(): GraphicItemType | Record<any, GraphicItemType> | object | undefined;
|
|
330
|
+
set image(value: GraphicItemType | Record<any, GraphicItemType> | object | undefined);
|
|
343
331
|
private defaultActivityIds;
|
|
344
332
|
/**
|
|
345
333
|
* The activities that are available in this room.
|
|
@@ -540,9 +528,7 @@ interface CommitmentBaseModelProps {
|
|
|
540
528
|
* ```
|
|
541
529
|
* @default undefined
|
|
542
530
|
*/
|
|
543
|
-
image?: GraphicItemType |
|
|
544
|
-
[key: string]: GraphicItemType;
|
|
545
|
-
};
|
|
531
|
+
image?: GraphicItemType | Record<any, GraphicItemType> | object;
|
|
546
532
|
/**
|
|
547
533
|
* 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.
|
|
548
534
|
* @default ExecutionTypeEnum.INTERACTION
|
|
@@ -638,9 +624,7 @@ declare class CommitmentBaseModel<TCharacter extends CharacterBaseModel = Charac
|
|
|
638
624
|
/**
|
|
639
625
|
* The image. It can be a string, an Element or a Pixi'VN Canvas Item.
|
|
640
626
|
*/
|
|
641
|
-
get image(): GraphicItemType |
|
|
642
|
-
[key: string]: GraphicItemType;
|
|
643
|
-
} | undefined;
|
|
627
|
+
get image(): GraphicItemType | Record<any, GraphicItemType> | object | undefined;
|
|
644
628
|
private _executionType;
|
|
645
629
|
/**
|
|
646
630
|
* 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.
|
|
@@ -809,10 +793,14 @@ declare function clearExpiredRoutine(): void;
|
|
|
809
793
|
declare function getCurrentCommitments<TCommitment extends CommitmentBaseModel = CommitmentBaseModel>(): TCommitment[];
|
|
810
794
|
declare function getCommitmentByCharacter<TCommitment extends CommitmentBaseModel = CommitmentBaseModel, TCharacter extends CharacterBaseModel = CharacterBaseModel>(character: TCharacter): TCommitment | undefined;
|
|
811
795
|
|
|
796
|
+
type ITimeStlot = {
|
|
797
|
+
name: string;
|
|
798
|
+
startHour: number;
|
|
799
|
+
};
|
|
812
800
|
/**
|
|
813
801
|
* Time Settings, which can be set using `TimeManager.editSettings`
|
|
814
802
|
*/
|
|
815
|
-
|
|
803
|
+
type TimeSettings = {
|
|
816
804
|
/**
|
|
817
805
|
* Minimum hour of the day (default: 0)
|
|
818
806
|
*/
|
|
@@ -853,11 +841,8 @@ interface TimeSettings {
|
|
|
853
841
|
* ```
|
|
854
842
|
*/
|
|
855
843
|
weekDaysNames?: string[];
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
name: string;
|
|
859
|
-
startHour: number;
|
|
860
|
-
}
|
|
844
|
+
};
|
|
845
|
+
|
|
861
846
|
declare class TimeManager {
|
|
862
847
|
private constructor();
|
|
863
848
|
private static editSettings;
|
|
@@ -913,7 +898,7 @@ declare class TimeManager {
|
|
|
913
898
|
* )
|
|
914
899
|
* }
|
|
915
900
|
*/
|
|
916
|
-
static get
|
|
901
|
+
static get currentTimeSlot(): number;
|
|
917
902
|
/**
|
|
918
903
|
* This function will increase the current hour by the given time spent.
|
|
919
904
|
* If the new hour is greater than or equal to the max day hours, then it will increase the day and set the new hour.
|
|
@@ -937,4 +922,4 @@ declare class TimeManager {
|
|
|
937
922
|
static nowIsBetween(fromHour: number, toHour: number): boolean;
|
|
938
923
|
}
|
|
939
924
|
|
|
940
|
-
export { ActivityModel, type ActivityProps, CommitmentBaseModel, type CommitmentBaseModelProps, ExecutionTypeEnum, Goal, type GoalProps, LocationBaseModel, type LocationBaseModelProps, MapBaseModel, type MapBaseModelProps, QuestBaseModel, type QuestBaseModelProps, type QuestsRequiredType, RoomBaseModel, type RoomBaseModelProps, StageBaseModel, type StageBaseModelProps, TimeManager, type TimeSettings, addTemporaryCommitment, clearExpiredActivities, clearExpiredRoutine, currentActivities, getActivityById, getAllLocations, getAllMaps, getCommitmentByCharacter, getCommitmentById, getCueerntMap, getCurrenrLocation, getCurrentCommitments, getCurrentRoom, getFixedCommitments, getRoomById, getTemporaryCommitments, saveActivity, saveCommitment, saveRoom, setCurrentRoom, setFixedCommitments };
|
|
925
|
+
export { ActivityModel, type ActivityProps, CommitmentBaseModel, type CommitmentBaseModelProps, ExecutionTypeEnum, Goal, type GoalProps, type ITimeStlot, LocationBaseModel, type LocationBaseModelProps, MapBaseModel, type MapBaseModelProps, QuestBaseModel, type QuestBaseModelProps, type QuestsRequiredType, RoomBaseModel, type RoomBaseModelProps, StageBaseModel, type StageBaseModelProps, TimeManager, type TimeSettings, addTemporaryCommitment, clearExpiredActivities, clearExpiredRoutine, currentActivities, getActivityById, getAllLocations, getAllMaps, getCommitmentByCharacter, getCommitmentById, getCueerntMap, getCurrenrLocation, getCurrentCommitments, getCurrentRoom, getFixedCommitments, getRoomById, getTemporaryCommitments, saveActivity, saveCommitment, saveRoom, setCurrentRoom, setFixedCommitments };
|
package/dist/index.d.ts
CHANGED
|
@@ -132,9 +132,7 @@ interface MapBaseModelProps<TMap extends MapBaseModel = MapBaseModel> {
|
|
|
132
132
|
* ```
|
|
133
133
|
* @default undefined
|
|
134
134
|
*/
|
|
135
|
-
image?: GraphicItemType |
|
|
136
|
-
[key: string]: GraphicItemType;
|
|
137
|
-
};
|
|
135
|
+
image?: GraphicItemType | Record<any, GraphicItemType> | object;
|
|
138
136
|
/**
|
|
139
137
|
* The neighboring maps that are available in this map.
|
|
140
138
|
* @example
|
|
@@ -196,12 +194,8 @@ declare class MapBaseModel extends StoredClassModel {
|
|
|
196
194
|
* The image of the map. It can be a string, an Element or a Pixi'VN Canvas Item.
|
|
197
195
|
* If you set undefined, it will return the initial value of image.
|
|
198
196
|
*/
|
|
199
|
-
get image(): GraphicItemType |
|
|
200
|
-
|
|
201
|
-
} | undefined;
|
|
202
|
-
set image(value: GraphicItemType | {
|
|
203
|
-
[key: string]: GraphicItemType;
|
|
204
|
-
} | undefined);
|
|
197
|
+
get image(): GraphicItemType | Record<any, GraphicItemType> | object | undefined;
|
|
198
|
+
set image(value: GraphicItemType | Record<any, GraphicItemType> | object | undefined);
|
|
205
199
|
private defaultDisabled;
|
|
206
200
|
/**
|
|
207
201
|
* Whether is disabled. If it is a string, it is a Pixi'VN flag name.
|
|
@@ -262,9 +256,7 @@ interface RoomBaseModelProps {
|
|
|
262
256
|
* ```
|
|
263
257
|
* @default undefined
|
|
264
258
|
*/
|
|
265
|
-
image?: GraphicItemType |
|
|
266
|
-
[key: string]: GraphicItemType;
|
|
267
|
-
};
|
|
259
|
+
image?: GraphicItemType | Record<any, GraphicItemType> | object;
|
|
268
260
|
/**
|
|
269
261
|
* The activities that are available in this room.
|
|
270
262
|
* @default []
|
|
@@ -334,12 +326,8 @@ declare class RoomBaseModel<TLocation extends LocationBaseModel = LocationBaseMo
|
|
|
334
326
|
* The image. It can be a string, an Element or a Pixi'VN Canvas Item.
|
|
335
327
|
* If you set undefined, it will return the initial value of image.
|
|
336
328
|
*/
|
|
337
|
-
get image(): GraphicItemType |
|
|
338
|
-
|
|
339
|
-
} | undefined;
|
|
340
|
-
set image(value: GraphicItemType | {
|
|
341
|
-
[key: string]: GraphicItemType;
|
|
342
|
-
} | undefined);
|
|
329
|
+
get image(): GraphicItemType | Record<any, GraphicItemType> | object | undefined;
|
|
330
|
+
set image(value: GraphicItemType | Record<any, GraphicItemType> | object | undefined);
|
|
343
331
|
private defaultActivityIds;
|
|
344
332
|
/**
|
|
345
333
|
* The activities that are available in this room.
|
|
@@ -540,9 +528,7 @@ interface CommitmentBaseModelProps {
|
|
|
540
528
|
* ```
|
|
541
529
|
* @default undefined
|
|
542
530
|
*/
|
|
543
|
-
image?: GraphicItemType |
|
|
544
|
-
[key: string]: GraphicItemType;
|
|
545
|
-
};
|
|
531
|
+
image?: GraphicItemType | Record<any, GraphicItemType> | object;
|
|
546
532
|
/**
|
|
547
533
|
* 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.
|
|
548
534
|
* @default ExecutionTypeEnum.INTERACTION
|
|
@@ -638,9 +624,7 @@ declare class CommitmentBaseModel<TCharacter extends CharacterBaseModel = Charac
|
|
|
638
624
|
/**
|
|
639
625
|
* The image. It can be a string, an Element or a Pixi'VN Canvas Item.
|
|
640
626
|
*/
|
|
641
|
-
get image(): GraphicItemType |
|
|
642
|
-
[key: string]: GraphicItemType;
|
|
643
|
-
} | undefined;
|
|
627
|
+
get image(): GraphicItemType | Record<any, GraphicItemType> | object | undefined;
|
|
644
628
|
private _executionType;
|
|
645
629
|
/**
|
|
646
630
|
* 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.
|
|
@@ -809,10 +793,14 @@ declare function clearExpiredRoutine(): void;
|
|
|
809
793
|
declare function getCurrentCommitments<TCommitment extends CommitmentBaseModel = CommitmentBaseModel>(): TCommitment[];
|
|
810
794
|
declare function getCommitmentByCharacter<TCommitment extends CommitmentBaseModel = CommitmentBaseModel, TCharacter extends CharacterBaseModel = CharacterBaseModel>(character: TCharacter): TCommitment | undefined;
|
|
811
795
|
|
|
796
|
+
type ITimeStlot = {
|
|
797
|
+
name: string;
|
|
798
|
+
startHour: number;
|
|
799
|
+
};
|
|
812
800
|
/**
|
|
813
801
|
* Time Settings, which can be set using `TimeManager.editSettings`
|
|
814
802
|
*/
|
|
815
|
-
|
|
803
|
+
type TimeSettings = {
|
|
816
804
|
/**
|
|
817
805
|
* Minimum hour of the day (default: 0)
|
|
818
806
|
*/
|
|
@@ -853,11 +841,8 @@ interface TimeSettings {
|
|
|
853
841
|
* ```
|
|
854
842
|
*/
|
|
855
843
|
weekDaysNames?: string[];
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
name: string;
|
|
859
|
-
startHour: number;
|
|
860
|
-
}
|
|
844
|
+
};
|
|
845
|
+
|
|
861
846
|
declare class TimeManager {
|
|
862
847
|
private constructor();
|
|
863
848
|
private static editSettings;
|
|
@@ -913,7 +898,7 @@ declare class TimeManager {
|
|
|
913
898
|
* )
|
|
914
899
|
* }
|
|
915
900
|
*/
|
|
916
|
-
static get
|
|
901
|
+
static get currentTimeSlot(): number;
|
|
917
902
|
/**
|
|
918
903
|
* This function will increase the current hour by the given time spent.
|
|
919
904
|
* If the new hour is greater than or equal to the max day hours, then it will increase the day and set the new hour.
|
|
@@ -937,4 +922,4 @@ declare class TimeManager {
|
|
|
937
922
|
static nowIsBetween(fromHour: number, toHour: number): boolean;
|
|
938
923
|
}
|
|
939
924
|
|
|
940
|
-
export { ActivityModel, type ActivityProps, CommitmentBaseModel, type CommitmentBaseModelProps, ExecutionTypeEnum, Goal, type GoalProps, LocationBaseModel, type LocationBaseModelProps, MapBaseModel, type MapBaseModelProps, QuestBaseModel, type QuestBaseModelProps, type QuestsRequiredType, RoomBaseModel, type RoomBaseModelProps, StageBaseModel, type StageBaseModelProps, TimeManager, type TimeSettings, addTemporaryCommitment, clearExpiredActivities, clearExpiredRoutine, currentActivities, getActivityById, getAllLocations, getAllMaps, getCommitmentByCharacter, getCommitmentById, getCueerntMap, getCurrenrLocation, getCurrentCommitments, getCurrentRoom, getFixedCommitments, getRoomById, getTemporaryCommitments, saveActivity, saveCommitment, saveRoom, setCurrentRoom, setFixedCommitments };
|
|
925
|
+
export { ActivityModel, type ActivityProps, CommitmentBaseModel, type CommitmentBaseModelProps, ExecutionTypeEnum, Goal, type GoalProps, type ITimeStlot, LocationBaseModel, type LocationBaseModelProps, MapBaseModel, type MapBaseModelProps, QuestBaseModel, type QuestBaseModelProps, type QuestsRequiredType, RoomBaseModel, type RoomBaseModelProps, StageBaseModel, type StageBaseModelProps, TimeManager, type TimeSettings, addTemporaryCommitment, clearExpiredActivities, clearExpiredRoutine, currentActivities, getActivityById, getAllLocations, getAllMaps, getCommitmentByCharacter, getCommitmentById, getCueerntMap, getCurrenrLocation, getCurrentCommitments, getCurrentRoom, getFixedCommitments, getRoomById, getTemporaryCommitments, saveActivity, saveCommitment, saveRoom, setCurrentRoom, setFixedCommitments };
|
package/dist/index.js
CHANGED
|
@@ -257,7 +257,7 @@ var TimeManager = class _TimeManager {
|
|
|
257
257
|
* )
|
|
258
258
|
* }
|
|
259
259
|
*/
|
|
260
|
-
static get
|
|
260
|
+
static get currentTimeSlot() {
|
|
261
261
|
if (_TimeManager.timeSlots.length === 0) {
|
|
262
262
|
console.warn("[NQTR] Time slots are not defined");
|
|
263
263
|
return 0;
|
|
@@ -1426,7 +1426,7 @@ function setCurrentRoom(room) {
|
|
|
1426
1426
|
return;
|
|
1427
1427
|
}
|
|
1428
1428
|
}
|
|
1429
|
-
|
|
1429
|
+
import_pixi_vn10.GameStorageManager.setVariable(CURRENT_ROOM_MEMORY_KEY, room.id);
|
|
1430
1430
|
}
|
|
1431
1431
|
function getCurrentRoom() {
|
|
1432
1432
|
let roomId = import_pixi_vn10.GameStorageManager.getVariable(CURRENT_ROOM_MEMORY_KEY);
|