@drincs/nqtr 0.5.4 → 0.5.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.
Files changed (38) hide show
  1. package/README.md +29 -4
  2. package/dist/{RoomInterface-C_Dbpef2.d.ts → RoomInterface-COSoQndi.d.mts} +6 -2
  3. package/dist/{RoomInterface-B6ryEuU-.d.mts → RoomInterface-VyDG8FVX.d.ts} +6 -2
  4. package/dist/{StageInterface-C1Zfcpk3.d.mts → StageInterface-v96_K9Tg.d.mts} +21 -9
  5. package/dist/{StageInterface-C1Zfcpk3.d.ts → StageInterface-v96_K9Tg.d.ts} +21 -9
  6. package/dist/classes/index.cjs +1 -1
  7. package/dist/classes/index.cjs.map +1 -1
  8. package/dist/classes/index.d.mts +7 -3
  9. package/dist/classes/index.d.ts +7 -3
  10. package/dist/classes/index.mjs +1 -1
  11. package/dist/classes/index.mjs.map +1 -1
  12. package/dist/decorators/index.cjs +1 -1
  13. package/dist/decorators/index.cjs.map +1 -1
  14. package/dist/decorators/index.d.mts +2 -2
  15. package/dist/decorators/index.d.ts +2 -2
  16. package/dist/decorators/index.mjs +1 -1
  17. package/dist/decorators/index.mjs.map +1 -1
  18. package/dist/{index-DnY50udK.d.mts → index-BrR28W31.d.mts} +2 -2
  19. package/dist/{index-Q2x0LXsj.d.ts → index-CKbOHqkF.d.ts} +2 -2
  20. package/dist/{index-BDKsWLeX.d.ts → index-DQXOfV1Z.d.ts} +2 -2
  21. package/dist/{index-D1Z9gIAi.d.mts → index-jntH7-J_.d.mts} +2 -2
  22. package/dist/index.cjs +1 -1
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.mts +5 -5
  25. package/dist/index.d.ts +5 -5
  26. package/dist/index.mjs +1 -1
  27. package/dist/index.mjs.map +1 -1
  28. package/dist/interface/index.d.mts +3 -3
  29. package/dist/interface/index.d.ts +3 -3
  30. package/dist/managers/index.cjs +1 -1
  31. package/dist/managers/index.cjs.map +1 -1
  32. package/dist/managers/index.d.mts +3 -3
  33. package/dist/managers/index.d.ts +3 -3
  34. package/dist/managers/index.mjs +1 -1
  35. package/dist/managers/index.mjs.map +1 -1
  36. package/dist/types/index.d.mts +1 -1
  37. package/dist/types/index.d.ts +1 -1
  38. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/constants.ts","../../src/utils/log-utility.ts","../../src/decorators/RegisteredActivities.ts","../../src/decorators/RegisteredCommitments.ts","../../src/decorators/RegisteredLocations.ts","../../src/decorators/RegisteredMaps.ts","../../src/decorators/RegisteredQuests.ts","../../src/decorators/RegisteredRooms.ts","../../src/functions/tracking-changes.ts","../../src/managers/NavigatorManager.ts","../../src/managers/QuestManager.ts","../../src/managers/RoutineManager.ts","../../src/managers/TimeManagerSettings.ts","../../src/managers/TimeManager.ts","../../src/managers/index.ts"],"names":["TIME_DATA_KEY","CURRENT_ROOM_MEMORY_KEY","LATEST_EVENT_MEMORY_KEY","logger","message","optionalParams","registeredActivities","CachedMap","RegisteredActivities","add","activities","activity","get","id","e","values","has","registeredCommitments","fixedCommitments","RegisteredCommitments","commitments","commitment","RegisteredCommitments_default","registeredLocations","RegisteredLocations","location","c","RegisteredLocations_default","registeredMaps","RegisteredMaps","map","RegisteredMaps_default","registeredQuests","RegisteredQuest","quests","quest","RegisteredQuests_default","registeredRooms","RegisteredRooms","room","RegisteredRooms_default","setLastEvent","event","storage","NavigatorManager","roomId","prevRoom","QuestManager","props","promises","TEMPORARY_COMMITMENT_CATEGORY_MEMORY_KEY","RoutineManager","commitmentsIds","currentCommitments","character_commitments","ch","character","TimeManagerSettings","TimeManager","settings","dayStartTime","dayEndTime","defaultTimeSpent","timeSlots","weekLength","weekendStartDay","getDayName","data","value","prev","index","slot","delta","newTime","time","newDate","fromTime","toTime","currentTime","timeTracker","navigator","routine","questsNotebook"],"mappings":"gDACO,IAAMA,CAAAA,CAAgB,+BAEhBC,CAAAA,CAA0B,gCAAA,CAC1BC,CAAAA,CAA0B,8BA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CAAcD,CAAAA,CAE7CC,CAAAA,EAAeF,CAAAA,EAAYE,CAAAA,CAAcD,CACpD,CACJ,CAAA,CCtNA,IAAME,EAAAA,CAAc,IAAIrB,CAAAA,CAClBsB,EAAAA,CAAY,IAAIpC,CAAAA,CAChBqC,EAAAA,CAAU,IAAI9B,CAAAA,CACd+B,EAAAA,CAAiB,IAAInC","file":"index.mjs","sourcesContent":["export const TIME_SETTINGS_KEY = \"___nqtr-time_manager_settings___\";\nexport const TIME_DATA_KEY = \"___nqtr-time_manager_data___\";\n\nexport const CURRENT_ROOM_MEMORY_KEY = \"___nqtr-current_room_memory___\";\nexport const LATEST_EVENT_MEMORY_KEY = \"___nqtr-last_event_memory___\";\n","export namespace logger {\n export const log = (message?: any, ...optionalParams: any[]) => console.log(`[NQTR] ${message}`, ...optionalParams);\n export const warn = (message?: any, ...optionalParams: any[]) =>\n console.warn(`[NQTR] ${message}`, ...optionalParams);\n export const error = (message?: any, ...optionalParams: any[]) =>\n console.error(`[NQTR] ${message}`, ...optionalParams);\n export const info = (message?: any, ...optionalParams: any[]) =>\n console.info(`[NQTR] ${message}`, ...optionalParams);\n}\n","import { CachedMap } from \"@drincs/pixi-vn\";\nimport { ActivityInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\n/**\n * A Map that contains all activities registered and available to be used.\n * The key is the id of the activity and the value is the activity itself.\n */\nconst registeredActivities = new CachedMap<string, ActivityInterface>({ cacheSize: 20 });\n\nnamespace RegisteredActivities {\n /**\n * Save an activity in the registered activities. If the activity already exists, it will be overwritten.\n * @param activity The activity to save.\n * @returns\n */\n export function add(activities: ActivityInterface | ActivityInterface[]) {\n if (Array.isArray(activities)) {\n activities.forEach((activity) => RegisteredActivities.add(activity));\n return;\n }\n registeredActivities.set(activities.id, activities);\n }\n\n /**\n * Get an activity by its id.\n * @param id The id of the activity.\n * @returns The activity or undefined if not found.\n */\n export function get(id: string): ActivityInterface | undefined {\n try {\n let activity = registeredActivities.get(id);\n if (!activity) {\n console.warn(`[NQTR] Activity ${id} not found, you should register it first`);\n return;\n }\n return activity;\n } catch (e) {\n logger.error(`Error while getting Activity ${id}`, e);\n return;\n }\n }\n\n /**\n * Get a list of all activities registered.\n * @returns An array of activities.\n */\n export function values(): ActivityInterface[] {\n return Array.from(registeredActivities.values());\n }\n\n /**\n * Check if an activity is registered.\n * @param id The id of the activity.\n * @returns True if the activity is registered, false otherwise.\n */\n export function has(id: string): boolean {\n return registeredActivities.has(id);\n }\n}\nexport default RegisteredActivities;\n","import { CachedMap } from \"@drincs/pixi-vn\";\nimport { CommitmentInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\n/**\n * A Map that contains all commitments registered and available to be used.\n * The key is the id of the commitment and the value is the commitment itself.\n */\nexport const registeredCommitments = new CachedMap<string, CommitmentInterface>({ cacheSize: 20 });\nexport const fixedCommitments = new CachedMap<string, CommitmentInterface>({ cacheSize: 20 });\n\nnamespace RegisteredCommitments {\n /**\n * Save a commitment in the registered commitments. If the commitment already exists, it will be overwritten.\n * @param commitment The commitment to save.\n * @returns\n */\n export function add(commitments: CommitmentInterface | CommitmentInterface[]) {\n if (Array.isArray(commitments)) {\n commitments.forEach((commitment) => RegisteredCommitments.add(commitment));\n return;\n }\n console.warn(`[NQTR] Registering commitment ${commitments.id}`, commitments);\n registeredCommitments.set(commitments.id, commitments);\n }\n /**\n * Get a commitment by its id.\n * @param id The id of the commitment.\n * @returns The commitment or undefined if not found.\n */\n export function get(id: string): CommitmentInterface | undefined {\n try {\n let commitment = registeredCommitments.get(id);\n if (!commitment) {\n console.warn(`[NQTR] Commitment ${id} not found, you should register it first`);\n return;\n }\n return commitment;\n } catch (e) {\n logger.error(`Error while getting Commitment ${id}`, e);\n return;\n }\n }\n /**\n * Get a list of all commitments registered.\n * @returns An array of commitments.\n */\n export function values(): CommitmentInterface[] {\n return Array.from(registeredCommitments.values());\n }\n /**\n * Check if a commitment is registered.\n * @param id The id of the commitment.\n * @returns True if the commitment is registered, false otherwise.\n */\n export function has(id: string): boolean {\n return registeredCommitments.has(id);\n }\n}\nexport default RegisteredCommitments;\n","import { CachedMap } from \"@drincs/pixi-vn\";\nimport { LocationInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\n/**\n * A Map that contains all locations registered and available to be used.\n * The key is the id of the location and the value is the location itself.\n */\nconst registeredLocations = new CachedMap<string, LocationInterface>({ cacheSize: 20 });\n\nnamespace RegisteredLocations {\n /**\n * Save a location in the registered locations. If the location already exists, it will be overwritten.\n * @param location The location to save.\n * @returns\n */\n export function add(location: LocationInterface | LocationInterface[]) {\n if (Array.isArray(location)) {\n location.forEach((c) => add(c));\n return;\n }\n // if (registeredLocations.has(location.id)) {\n // console.warn(`[NQTR] Location id ${location.id} already exists, it will be overwritten`);\n // }\n registeredLocations.set(location.id, location);\n }\n\n /**\n * Get a location by its id.\n * @param id The id of the location.\n * @returns The location or undefined if not found.\n */\n export function get(id: string): LocationInterface | undefined {\n try {\n let location = registeredLocations.get(id);\n if (!location) {\n console.warn(`[NQTR] Location ${id} not found, you should register it first`);\n return;\n }\n return location;\n } catch (e) {\n logger.error(`Error while getting Location ${id}`, e);\n return;\n }\n }\n\n /**\n * Get a list of all locations registered.\n * @returns An array of locations.\n */\n export function values(): LocationInterface[] {\n return Array.from(registeredLocations.values());\n }\n\n /**\n * Check if a location is registered.\n * @param id The id of the location.\n * @returns True if the location is registered, false otherwise.\n */\n export function has(id: string): boolean {\n return registeredLocations.has(id);\n }\n}\nexport default RegisteredLocations;\n","import { CachedMap } from \"@drincs/pixi-vn\";\nimport { MapInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\n/**\n * A Map that contains all maps registered and available to be used.\n * The key is the id of the map and the value is the map itself.\n */\nconst registeredMaps = new CachedMap<string, MapInterface>({ cacheSize: 20 });\n\nnamespace RegisteredMaps {\n /**\n * Save a map in the registered maps. If the map already exists, it will be overwritten.\n * @param map The map to save.\n * @returns\n */\n export function add(map: MapInterface | MapInterface[]) {\n if (Array.isArray(map)) {\n map.forEach((c) => add(c));\n return;\n }\n // if (registeredMaps.has(map.id)) {\n // console.warn(`[NQTR] Map id ${map.id} already exists, it will be overwritten`);\n // }\n registeredMaps.set(map.id, map);\n }\n\n /**\n * Get a map by its id.\n * @param id The id of the map.\n * @returns The map or undefined if not found.\n */\n export function get(id: string): MapInterface | undefined {\n try {\n let map = registeredMaps.get(id);\n if (!map) {\n console.warn(`[NQTR] Map ${id} not found, you should register it first`);\n return;\n }\n return map;\n } catch (e) {\n logger.error(`Error while getting Map ${id}`, e);\n return;\n }\n }\n\n /**\n * Get a list of all maps registered.\n * @returns An array of maps.\n */\n export function values(): MapInterface[] {\n return Array.from(registeredMaps.values());\n }\n\n /**\n * Check if a map is registered.\n * @param id The id of the map.\n * @returns True if the map is registered, false otherwise.\n */\n export function has(id: string): boolean {\n return registeredMaps.has(id);\n }\n}\nexport default RegisteredMaps;\n","import { CachedMap } from \"@drincs/pixi-vn\";\nimport { QuestInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\n/**\n * A Map that contains all quests registered and available to be used.\n * The key is the id of the quest and the value is the quest itself.\n */\nconst registeredQuests = new CachedMap<string, QuestInterface>({ cacheSize: 5 });\n\nnamespace RegisteredQuest {\n /**\n * Save a quest in the registered quests. If the quest already exists, it will be overwritten.\n * @param quest The quest to save.\n * @returns\n */\n export function add(quests: QuestInterface | QuestInterface[]) {\n if (Array.isArray(quests)) {\n quests.forEach((quest) => RegisteredQuest.add(quest));\n return;\n }\n registeredQuests.set(quests.id, quests);\n }\n /**\n * Get a quest by its id.\n * @param id The id of the quest.\n * @returns The quest or undefined if not found.\n */\n export function get(id: string): QuestInterface | undefined {\n try {\n let quest = registeredQuests.get(id);\n if (!quest) {\n console.warn(`[NQTR] Quest ${id} not found, you should register it first`);\n return;\n }\n return quest;\n } catch (e) {\n logger.error(`Error while getting Quest ${id}`, e);\n return;\n }\n }\n /**\n * Get a list of all quests registered.\n * @returns An array of quests.\n */\n export function values(): QuestInterface[] {\n return Array.from(registeredQuests.values());\n }\n /**\n * Check if a quest is registered.\n * @param id The id of the quest.\n * @returns True if the quest is registered, false otherwise.\n */\n export function has(id: string): boolean {\n return registeredQuests.has(id);\n }\n}\nexport default RegisteredQuest;\n","import { CachedMap } from \"@drincs/pixi-vn\";\nimport { RoomInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\nimport RegisteredLocations from \"./RegisteredLocations\";\nimport RegisteredMaps from \"./RegisteredMaps\";\n\n/**\n * A Map that contains all rooms registered and available to be used.\n * The key is the id of the room and the value is the room itself.\n */\nconst registeredRooms = new CachedMap<string, RoomInterface>({ cacheSize: 20 });\n\nnamespace RegisteredRooms {\n /**\n * Save a room in the registered rooms, and their location and map if they are not already registered.\n * If the room already exists, it will be overwritten.\n * @param room The room to save.\n * @returns\n */\n export function add(room: RoomInterface | RoomInterface[]) {\n if (Array.isArray(room)) {\n room.forEach((c) => add(c));\n return;\n }\n registeredRooms.set(room.id, room);\n let location = room.location;\n RegisteredLocations.add(location);\n let map = location?.map;\n if (map) {\n RegisteredMaps.add(map);\n }\n }\n\n /**\n * Get a room by its id.\n * @param id The id of the room.\n * @returns The room or undefined if not found.\n */\n export function get(id: string): RoomInterface | undefined {\n try {\n let room = registeredRooms.get(id);\n if (!room) {\n console.warn(`[NQTR] Room ${id} not found, you should register it first`);\n return;\n }\n return room;\n } catch (e) {\n logger.error(`Error while getting Room ${id}`, e);\n return;\n }\n }\n\n /**\n * Get a list of all rooms registered.\n * @returns An array of rooms.\n */\n export function values(): RoomInterface[] {\n return Array.from(registeredRooms.values());\n }\n\n /**\n * Check if a room is registered.\n * @param id The id of the room.\n * @returns True if the room is registered, false otherwise.\n */\n export function has(id: string): boolean {\n return registeredRooms.has(id);\n }\n}\nexport default RegisteredRooms;\n","import { storage } from \"@drincs/pixi-vn\";\nimport { LATEST_EVENT_MEMORY_KEY } from \"../constants\";\nimport LastEventType from \"../types/LastEventType\";\n\nexport function setLastEvent(event: LastEventType) {\n storage.setVariable(LATEST_EVENT_MEMORY_KEY, event);\n}\nexport function getLastEvent() {\n return storage.getVariable<LastEventType>(LATEST_EVENT_MEMORY_KEY);\n}\n","import { storage } from \"@drincs/pixi-vn\";\nimport { CURRENT_ROOM_MEMORY_KEY } from \"../constants\";\nimport { RegisteredLocations, RegisteredMaps, RegisteredRooms } from \"../decorators\";\nimport { setLastEvent } from \"../functions/tracking-changes\";\nimport { LocationInterface, MapInterface, RoomInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\nexport default class NavigatorManager {\n get rooms() {\n return RegisteredRooms.values();\n }\n get locations() {\n return RegisteredLocations.values();\n }\n get maps() {\n return RegisteredMaps.values();\n }\n get currentRoomId(): string | undefined {\n return storage.getVariable<string>(CURRENT_ROOM_MEMORY_KEY);\n }\n get currentRoom(): RoomInterface | undefined {\n let roomId = this.currentRoomId;\n if (!roomId) {\n logger.error(`The current room has not yet been set`);\n return;\n }\n let room = RegisteredRooms.get(roomId);\n if (!room) {\n logger.error(`Current room ${roomId} not found`);\n return;\n }\n return room;\n }\n set currentRoom(room: RoomInterface | string) {\n if (typeof room !== \"string\") {\n room = room.id;\n }\n let roomRegistrated = RegisteredRooms.get(room);\n if (!roomRegistrated) {\n logger.error(`The room ${room} is not registered, so it can't be set as current room`);\n return;\n }\n let prevRoom = storage.getVariable<string>(CURRENT_ROOM_MEMORY_KEY);\n if (prevRoom === room) {\n return;\n }\n\n setLastEvent({\n type: \"editroom\",\n prev: prevRoom,\n value: room,\n });\n storage.setVariable(CURRENT_ROOM_MEMORY_KEY, room);\n }\n get currentLocation(): LocationInterface | undefined {\n return this.currentRoom?.location;\n }\n get currentMap(): MapInterface | undefined {\n return this.currentRoom?.location.map;\n }\n /**\n * Clear all the expired activities.\n */\n clearExpiredActivities() {\n RegisteredRooms.values().forEach((room) => {\n room.clearExpiredActivities();\n });\n }\n}\n","import { OnRunProps } from \"@drincs/nqtr\";\nimport RegisteredQuest from \"../decorators/RegisteredQuests\";\nimport { QuestInterface } from \"../interface\";\n\nexport default class QuestManager {\n /**\n * The quests registered in the game.\n */\n get quests(): QuestInterface[] {\n return RegisteredQuest.values();\n }\n /**\n * The quests that are started, so they are in progress or completed or failed.\n */\n get startedQuests(): QuestInterface[] {\n return this.quests.filter((quest) => quest.started);\n }\n /**\n * The quests that are in progress.\n */\n get inProgressQuests(): QuestInterface[] {\n return this.quests.filter((quest) => quest.inProgress);\n }\n /**\n * The quests that are completed.\n */\n get completedQuests(): QuestInterface[] {\n return this.quests.filter((quest) => quest.completed);\n }\n /**\n * The quests that are failed.\n */\n get failedQuests(): QuestInterface[] {\n return this.quests.filter((quest) => quest.failed);\n }\n /**\n * The quests that are not started.\n */\n get notStartedQuests(): QuestInterface[] {\n return this.quests.filter((quest) => !quest.started);\n }\n /**\n * Get the quest by the id.\n * @param id The id of the quest.\n * @returns The quest with the id.\n */\n find(id: string): QuestInterface | undefined {\n return RegisteredQuest.get(id);\n }\n\n /**\n * Start the quests that must start on the current stage.\n */\n async startsStageMustBeStarted(props: OnRunProps) {\n let promises: Promise<void>[] = this.quests.map((quest) => {\n if (quest.currentStageMustStart) {\n return quest.startCurrentStage(props);\n }\n return Promise.resolve();\n });\n await Promise.all(promises);\n }\n}\n","import { CharacterInterface, storage } from \"@drincs/pixi-vn\";\nimport RegisteredCommitments, { fixedCommitments, registeredCommitments } from \"../decorators/RegisteredCommitments\";\nimport { CommitmentInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\nconst TEMPORARY_COMMITMENT_CATEGORY_MEMORY_KEY = \"___nqtr-temporary_commitment___\";\nexport default class RoutineManager {\n get fixedRoutine(): CommitmentInterface[] {\n return [...fixedCommitments.values()];\n }\n /**\n * Set a commitment as fixed, it will be always available. They cannot be deleted or edit during the game session.\n */\n set fixedRoutine(commitments: CommitmentInterface[]) {\n commitments.forEach((c) => {\n if (fixedCommitments.has(c.id)) {\n console.warn(`[NQTR] Commitment id ${c.id} already exists, it will be overwritten`);\n }\n fixedCommitments.set(c.id, c);\n });\n }\n\n /**\n * Get the temporary commitments by its id.\n * @returns The temporary commitments.\n */\n get temporaryRoutine(): CommitmentInterface[] {\n let commitmentsIds = storage.getVariable<string[]>(TEMPORARY_COMMITMENT_CATEGORY_MEMORY_KEY);\n if (!commitmentsIds) {\n return [];\n }\n let commitments = commitmentsIds\n .map((id) => RegisteredCommitments.get(id))\n .filter((commitment) => commitment !== undefined);\n return commitments;\n }\n\n get allRoutine(): CommitmentInterface[] {\n return [...this.fixedRoutine, ...this.temporaryRoutine];\n }\n\n /**\n * This feature adds the commitments during the game session.\n * @param commitment The commitment or commitments to add.\n */\n add(commitment: CommitmentInterface[] | CommitmentInterface) {\n if (!Array.isArray(commitment)) {\n commitment = [commitment];\n }\n let commitmentsIds = commitment\n .map((commitment) => {\n let commitmentTest = RegisteredCommitments.get(commitment.id);\n if (!commitmentTest) {\n console.warn(`[NQTR] Commitment ${commitment.id} not found, it will be ignored`);\n return undefined;\n }\n return commitment.id;\n })\n .filter((id) => id !== undefined);\n\n storage.setVariable(TEMPORARY_COMMITMENT_CATEGORY_MEMORY_KEY, commitmentsIds);\n }\n\n /**\n * Get the commitments added during the game session.\n * @param id The id of the commitment.\n * @returns The commitment or undefined if not found.\n */\n find(id: string): CommitmentInterface | undefined {\n return RegisteredCommitments.get(id);\n }\n\n /**\n * Remove the commitments added during the game session.\n * @param commitment The commitment or commitments to remove.\n */\n remove(commitment: CommitmentInterface[] | CommitmentInterface) {\n if (!Array.isArray(commitment)) {\n commitment = [commitment];\n }\n let commitmentsIds = commitment.map((commitment) => {\n return commitment.id;\n });\n\n let currentCommitments = storage.getVariable<string[]>(TEMPORARY_COMMITMENT_CATEGORY_MEMORY_KEY);\n if (!currentCommitments) {\n return;\n }\n currentCommitments = currentCommitments.filter((id) => !commitmentsIds.includes(id));\n storage.setVariable(TEMPORARY_COMMITMENT_CATEGORY_MEMORY_KEY, currentCommitments);\n }\n\n /**\n * Clear all the expired commitments.\n */\n clearExpiredRoutine() {\n RegisteredCommitments.values().forEach((commitment) => {\n if (commitment.expired) {\n registeredCommitments.delete(commitment.id);\n }\n });\n }\n\n /**\n * Get the current commitments. The hidden commitments are not included.\n * In case there is a character who has two or more commitments at the same time, will be selected the commitment with the highest priority.\n * Higher priority commitments are calculated using the following steps:\n * 1. The commitments that have Commitments BaseModel.priority set to a higher value will be selected first.\n * 2. If there are commitments with the same priority, the commitments that are not fixed will be selected first.\n * 3. If there are commitments with the same priority and the same fixed status, priority will be given to the commitment with a lower index.\n * @returns The current commitments.\n */\n get currentRoutine(): CommitmentInterface[] {\n let character_commitments: { [character: string]: CommitmentInterface } = {};\n [...this.fixedRoutine, ...this.temporaryRoutine].forEach((c) => {\n if (c.isActive) {\n if (c.characters.length > 0) {\n // all the characters don't already have commitments or the commitment has a higher priority\n let allAvailable = c.characters.every(\n (ch) => !character_commitments[ch.id] || c.priority > character_commitments[ch.id].priority\n );\n if (allAvailable) {\n c.characters.forEach((ch) => {\n character_commitments[ch.id] = c;\n });\n }\n } else {\n logger.error(`The commitment ${c.id} has no characters assigned`);\n }\n }\n });\n return Object.values(character_commitments);\n }\n\n /**\n * Get the character commitment.\n * @param character The character.\n * @returns The commitment or undefined if not found.\n */\n getCommitmentByCharacter(character: CharacterInterface): CommitmentInterface | undefined {\n this.currentRoutine.forEach((c) => {\n if (c.characters.map((ch) => ch.id).includes(character.id)) {\n return c;\n }\n });\n return undefined;\n }\n}\n","import { TimeSettings, TimeSlotInterface } from \"../types/TimeSettings\";\n\nexport default class TimeManagerSettings implements TimeSettings {\n static dayStartTime: number = 0;\n static dayEndTime: number = 24;\n static defaultTimeSpent: number = 1;\n static timeSlots: TimeSlotInterface[] = [];\n static weekLength: number = 7;\n static weekendStartDay: number = this.weekLength - 1;\n static getDayName?: (weekDayNumber: number) => string;\n}\n","import { storage } from \"@drincs/pixi-vn\";\nimport { TIME_DATA_KEY } from \"../constants\";\nimport { setLastEvent } from \"../functions/tracking-changes\";\nimport TimeDataType from \"../types/TimeDataType\";\nimport { TimeSettings, TimeSlotInterface } from \"../types/TimeSettings\";\nimport TimeManagerSettings from \"./TimeManagerSettings\";\n\nexport default class TimeManager {\n initialize(settings: TimeSettings) {\n const {\n dayStartTime = 0,\n dayEndTime = 24,\n defaultTimeSpent = 1,\n timeSlots = [],\n weekLength = 7,\n weekendStartDay = weekLength - 1,\n getDayName,\n } = settings;\n TimeManagerSettings.dayStartTime = dayStartTime;\n TimeManagerSettings.dayEndTime = dayEndTime;\n TimeManagerSettings.defaultTimeSpent = defaultTimeSpent;\n TimeManagerSettings.timeSlots = timeSlots;\n TimeManagerSettings.weekLength = weekLength;\n if (weekendStartDay >= TimeManagerSettings.weekLength) {\n console.warn(`[NQTR] Weekend start day should be less than week length ${weekLength}, so will be ignored`);\n } else {\n TimeManagerSettings.weekendStartDay = weekendStartDay;\n }\n TimeManagerSettings.getDayName = getDayName;\n }\n get dayStartTime(): number {\n return TimeManagerSettings.dayStartTime;\n }\n get dayEndTime(): number {\n return TimeManagerSettings.dayEndTime;\n }\n get defaultTimeSpent(): number {\n return TimeManagerSettings.defaultTimeSpent;\n }\n get timeSlots(): TimeSlotInterface[] {\n return TimeManagerSettings.timeSlots;\n }\n get weekLength(): number {\n return TimeManagerSettings.weekLength;\n }\n get weekendStartDay(): number {\n return TimeManagerSettings.weekendStartDay;\n }\n /**\n * Week days name\n * @param weekDayNumber The current week day number (from: 0 - to: {@link weekLength} - 1).\n * @returns The name of the week day.\n * @example\n * ```ts\n * (weekDayNumber: number) => {\n * const weekDaysNames = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];\n * return weekDaysNames[weekDayNumber];\n * }\n * ```\n */\n get getDayName() {\n return TimeManagerSettings.getDayName;\n }\n\n /**\n * Get the current time. Time is a numeric variable used to determine and manage time during a day/date.\n * It's recommended to use currentTime as if it were the current time. If you also want to manage minutes, you can use a float value.\n */\n get currentTime(): number {\n let data = storage.getVariable<TimeDataType>(TIME_DATA_KEY) || {};\n if (data.hasOwnProperty(\"currentTime\") && typeof data.currentTime === \"number\") {\n return data.currentTime;\n }\n return this.dayStartTime;\n }\n set currentTime(value: number | undefined) {\n let prev = storage.getVariable<TimeDataType>(TIME_DATA_KEY) || {};\n let data = { ...prev };\n if (typeof value === \"number\") {\n data.currentTime = value;\n } else {\n delete data.currentTime;\n }\n setLastEvent({\n type: \"edittime\",\n prev: prev,\n value: data,\n });\n storage.setVariable(TIME_DATA_KEY, data);\n }\n /**\n * Get the current date. Date is a numeric variable used to determine and manage the number of days passed.\n * It's recommended to use currentDate as if it were the current day.\n */\n get currentDate(): number {\n let data = storage.getVariable<TimeDataType>(TIME_DATA_KEY) || {};\n if (data.hasOwnProperty(\"currentDate\") && typeof data.currentDate === \"number\") {\n return data.currentDate;\n }\n return 0;\n }\n set currentDate(value: number | undefined) {\n let prev = storage.getVariable<TimeDataType>(TIME_DATA_KEY) || {};\n let data = { ...prev };\n if (typeof value === \"number\") {\n data.currentDate = value;\n } else {\n delete data.currentDate;\n }\n setLastEvent({\n type: \"edittime\",\n prev: prev,\n value: data,\n });\n storage.setVariable(TIME_DATA_KEY, data);\n }\n /**\n * If the current day is greater than or equal to the weekend start day, then it will return true.\n */\n get isWeekend(): boolean {\n return this.currentWeekDayNumber >= this.weekendStartDay;\n }\n /**\n * Get the current week day number (from: 1 - to: {@link weekLength}).\n * For example, if the week length is 7 and the current day is 10, then the result will be 4.\n */\n get currentWeekDayNumber(): number {\n let result = this.currentDate % this.weekLength;\n return result + 1;\n }\n /**\n * Get the current week day name. If the week days names are not defined, then it will return undefined.\n * For example, if the week days names are ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'] and the current day is 10, then the result will be 'Thursday'.\n * @default \"\"\n */\n get currentDayName(): string {\n if (!this.getDayName) {\n console.warn(`[NQTR] Week days names are not defined, so currentDayName will be empty`);\n return \"\";\n }\n return this.getDayName(this.currentWeekDayNumber - 1);\n }\n /**\n * Get the current {@link timeSlots} index.\n * You can use this property to create \"Image that changes based on the time period\":\n * @example\n * ```tsx\n * import { weekLength } from '@drincs/nqtr';\n *\n * function changeBackground() {\n * return (\n * <img src={`background-currentTimeSlot.currentTimeSlot.png`} />\n * )\n * }\n */\n get currentTimeSlot(): number {\n if (this.timeSlots.length === 0) {\n console.warn(\"[NQTR] Time slots are not defined\");\n return 0;\n }\n for (let index = 0; index < this.timeSlots.length; index++) {\n let slot = this.timeSlots[index];\n if (this.timeSlots.length > index + 1) {\n if (this.nowIsBetween(slot.startTime, this.timeSlots[index + 1].startTime)) {\n return index;\n }\n }\n }\n return this.timeSlots.length - 1;\n }\n\n /**\n * This function will increase the current time by the given time spent.\n * If the new time is greater than or equal to the max day times, then it will increase the day and set the new time.\n * @param delta is the time spent in times (default: {@link defaultTimeSpent})\n * @returns currentTimeSlot.currentTime\n */\n increaseTime(delta: number = this.defaultTimeSpent): number {\n let newTime = this.currentTime + delta;\n if (newTime >= this.dayEndTime) {\n this.increaseDate();\n newTime = this.dayStartTime + (newTime - this.dayEndTime);\n }\n this.currentTime = newTime;\n return this.currentTime;\n }\n\n /**\n * This function will increase the current date by the given delta.\n * @param delta is the number of days to increase (default: 1)\n * @param time is the time of the new day (default: {@link dayStartTime})\n * @returns timeTracker.currentDate\n */\n increaseDate(delta: number = 1, time: number = this.dayStartTime): number {\n let newDate = this.currentDate + delta;\n this.currentDate = newDate;\n this.currentTime = time;\n return this.currentDate;\n }\n\n /**\n * This function will check if the current time is between the given times.\n * @param fromTime the starting time. If the {@link currentTime} is equal to this time, the function will return true.\n * @param toTime the ending time.\n * @returns true if the current time is between the given times, otherwise false.\n */\n nowIsBetween(fromTime: number | undefined, toTime: number | undefined): boolean {\n if (fromTime === undefined) {\n fromTime = this.dayStartTime - 1;\n }\n if (toTime === undefined) {\n toTime = this.dayEndTime + 1;\n }\n let currentTime = this.currentTime;\n if (fromTime < toTime) {\n return currentTime >= fromTime && currentTime < toTime;\n }\n return currentTime >= fromTime || currentTime < toTime;\n }\n}\n","import NavigatorManager from \"./NavigatorManager\";\nimport QuestManager from \"./QuestManager\";\nimport RoutineManager from \"./RoutineManager\";\nimport { default as TimeManager } from \"./TimeManager\";\n\nconst timeTracker = new TimeManager();\nconst navigator = new NavigatorManager();\nconst routine = new RoutineManager();\nconst questsNotebook = new QuestManager();\n\nexport { navigator, questsNotebook, routine, timeTracker };\n"]}
1
+ {"version":3,"sources":["../../src/constants.ts","../../src/utils/log-utility.ts","../../src/decorators/RegisteredActivities.ts","../../src/decorators/RegisteredCommitments.ts","../../src/decorators/RegisteredLocations.ts","../../src/decorators/RegisteredMaps.ts","../../src/decorators/RegisteredQuests.ts","../../src/decorators/RegisteredRooms.ts","../../src/functions/tracking-changes.ts","../../src/managers/NavigatorManager.ts","../../src/managers/QuestManager.ts","../../src/managers/RoutineManager.ts","../../src/managers/TimeManagerSettings.ts","../../src/managers/TimeManager.ts","../../src/managers/index.ts"],"names":["TIME_DATA_KEY","CURRENT_ROOM_MEMORY_KEY","LATEST_EVENT_MEMORY_KEY","logger","message","optionalParams","registeredActivities","CachedMap","RegisteredActivities","add","activities","activity","get","id","e","values","has","registeredCommitments","fixedCommitments","RegisteredCommitments","commitments","commitment","RegisteredCommitments_default","registeredLocations","RegisteredLocations","location","c","RegisteredLocations_default","registeredMaps","RegisteredMaps","map","RegisteredMaps_default","registeredQuests","RegisteredQuest","quests","quest","RegisteredQuests_default","registeredRooms","RegisteredRooms","room","RegisteredRooms_default","setLastEvent","event","storage","NavigatorManager","roomId","prevRoom","QuestManager","props","promises","TEMPORARY_COMMITMENT_CATEGORY_MEMORY_KEY","RoutineManager","commitmentsIds","currentCommitments","character_commitments","ch","character","TimeManagerSettings","TimeManager","settings","dayStartTime","dayEndTime","defaultTimeSpent","timeSlots","weekLength","weekendStartDay","getDayName","data","value","prev","index","slot","delta","newTime","time","newDate","fromTime","toTime","currentTime","timeTracker","navigator","routine","questsNotebook"],"mappings":"gDACO,IAAMA,CAAAA,CAAgB,+BAEhBC,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A,IAAME,EAAAA,CAAc,IAAIrB,CAAAA,CAClBsB,EAAAA,CAAY,IAAIpC,CAAAA,CAChBqC,EAAAA,CAAU,IAAI9B,CAAAA,CACd+B,EAAAA,CAAiB,IAAInC","file":"index.mjs","sourcesContent":["export const TIME_SETTINGS_KEY = \"___nqtr-time_manager_settings___\";\nexport const TIME_DATA_KEY = \"___nqtr-time_manager_data___\";\n\nexport const CURRENT_ROOM_MEMORY_KEY = \"___nqtr-current_room_memory___\";\nexport const LATEST_EVENT_MEMORY_KEY = \"___nqtr-last_event_memory___\";\n","export namespace logger {\n export const log = (message?: any, ...optionalParams: any[]) => console.log(`[NQTR] ${message}`, ...optionalParams);\n export const warn = (message?: any, ...optionalParams: any[]) =>\n console.warn(`[NQTR] ${message}`, ...optionalParams);\n export const error = (message?: any, ...optionalParams: any[]) =>\n console.error(`[NQTR] ${message}`, ...optionalParams);\n export const info = (message?: any, ...optionalParams: any[]) =>\n console.info(`[NQTR] ${message}`, ...optionalParams);\n}\n","import { CachedMap } from \"@drincs/pixi-vn\";\nimport { ActivityInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\n/**\n * A Map that contains all activities registered and available to be used.\n * The key is the id of the activity and the value is the activity itself.\n */\nconst registeredActivities = new CachedMap<string, ActivityInterface>({ cacheSize: 20 });\n\nnamespace RegisteredActivities {\n /**\n * Save an activity in the registered activities. If the activity already exists, it will be overwritten.\n * @param activity The activity to save.\n * @returns\n */\n export function add(activities: ActivityInterface | ActivityInterface[]) {\n if (Array.isArray(activities)) {\n activities.forEach((activity) => RegisteredActivities.add(activity));\n return;\n }\n registeredActivities.set(activities.id, activities);\n }\n\n /**\n * Get an activity by its id.\n * @param id The id of the activity.\n * @returns The activity or undefined if not found.\n */\n export function get(id: string): ActivityInterface | undefined {\n try {\n let activity = registeredActivities.get(id);\n if (!activity) {\n console.warn(`[NQTR] Activity ${id} not found, you should register it first`);\n return;\n }\n return activity;\n } catch (e) {\n logger.error(`Error while getting Activity ${id}`, e);\n return;\n }\n }\n\n /**\n * Get a list of all activities registered.\n * @returns An array of activities.\n */\n export function values(): ActivityInterface[] {\n return Array.from(registeredActivities.values());\n }\n\n /**\n * Check if an activity is registered.\n * @param id The id of the activity.\n * @returns True if the activity is registered, false otherwise.\n */\n export function has(id: string): boolean {\n return registeredActivities.has(id);\n }\n}\nexport default RegisteredActivities;\n","import { CachedMap } from \"@drincs/pixi-vn\";\nimport { CommitmentInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\n/**\n * A Map that contains all commitments registered and available to be used.\n * The key is the id of the commitment and the value is the commitment itself.\n */\nexport const registeredCommitments = new CachedMap<string, CommitmentInterface>({ cacheSize: 20 });\nexport const fixedCommitments = new CachedMap<string, CommitmentInterface>({ cacheSize: 20 });\n\nnamespace RegisteredCommitments {\n /**\n * Save a commitment in the registered commitments. If the commitment already exists, it will be overwritten.\n * @param commitment The commitment to save.\n * @returns\n */\n export function add(commitments: CommitmentInterface | CommitmentInterface[]) {\n if (Array.isArray(commitments)) {\n commitments.forEach((commitment) => RegisteredCommitments.add(commitment));\n return;\n }\n registeredCommitments.set(commitments.id, commitments);\n }\n /**\n * Get a commitment by its id.\n * @param id The id of the commitment.\n * @returns The commitment or undefined if not found.\n */\n export function get(id: string): CommitmentInterface | undefined {\n try {\n let commitment = registeredCommitments.get(id);\n if (!commitment) {\n console.warn(`[NQTR] Commitment ${id} not found, you should register it first`);\n return;\n }\n return commitment;\n } catch (e) {\n logger.error(`Error while getting Commitment ${id}`, e);\n return;\n }\n }\n /**\n * Get a list of all commitments registered.\n * @returns An array of commitments.\n */\n export function values(): CommitmentInterface[] {\n return Array.from(registeredCommitments.values());\n }\n /**\n * Check if a commitment is registered.\n * @param id The id of the commitment.\n * @returns True if the commitment is registered, false otherwise.\n */\n export function has(id: string): boolean {\n return registeredCommitments.has(id);\n }\n}\nexport default RegisteredCommitments;\n","import { CachedMap } from \"@drincs/pixi-vn\";\nimport { LocationInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\n/**\n * A Map that contains all locations registered and available to be used.\n * The key is the id of the location and the value is the location itself.\n */\nconst registeredLocations = new CachedMap<string, LocationInterface>({ cacheSize: 20 });\n\nnamespace RegisteredLocations {\n /**\n * Save a location in the registered locations. If the location already exists, it will be overwritten.\n * @param location The location to save.\n * @returns\n */\n export function add(location: LocationInterface | LocationInterface[]) {\n if (Array.isArray(location)) {\n location.forEach((c) => add(c));\n return;\n }\n // if (registeredLocations.has(location.id)) {\n // console.warn(`[NQTR] Location id ${location.id} already exists, it will be overwritten`);\n // }\n registeredLocations.set(location.id, location);\n }\n\n /**\n * Get a location by its id.\n * @param id The id of the location.\n * @returns The location or undefined if not found.\n */\n export function get(id: string): LocationInterface | undefined {\n try {\n let location = registeredLocations.get(id);\n if (!location) {\n console.warn(`[NQTR] Location ${id} not found, you should register it first`);\n return;\n }\n return location;\n } catch (e) {\n logger.error(`Error while getting Location ${id}`, e);\n return;\n }\n }\n\n /**\n * Get a list of all locations registered.\n * @returns An array of locations.\n */\n export function values(): LocationInterface[] {\n return Array.from(registeredLocations.values());\n }\n\n /**\n * Check if a location is registered.\n * @param id The id of the location.\n * @returns True if the location is registered, false otherwise.\n */\n export function has(id: string): boolean {\n return registeredLocations.has(id);\n }\n}\nexport default RegisteredLocations;\n","import { CachedMap } from \"@drincs/pixi-vn\";\nimport { MapInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\n/**\n * A Map that contains all maps registered and available to be used.\n * The key is the id of the map and the value is the map itself.\n */\nconst registeredMaps = new CachedMap<string, MapInterface>({ cacheSize: 20 });\n\nnamespace RegisteredMaps {\n /**\n * Save a map in the registered maps. If the map already exists, it will be overwritten.\n * @param map The map to save.\n * @returns\n */\n export function add(map: MapInterface | MapInterface[]) {\n if (Array.isArray(map)) {\n map.forEach((c) => add(c));\n return;\n }\n // if (registeredMaps.has(map.id)) {\n // console.warn(`[NQTR] Map id ${map.id} already exists, it will be overwritten`);\n // }\n registeredMaps.set(map.id, map);\n }\n\n /**\n * Get a map by its id.\n * @param id The id of the map.\n * @returns The map or undefined if not found.\n */\n export function get(id: string): MapInterface | undefined {\n try {\n let map = registeredMaps.get(id);\n if (!map) {\n console.warn(`[NQTR] Map ${id} not found, you should register it first`);\n return;\n }\n return map;\n } catch (e) {\n logger.error(`Error while getting Map ${id}`, e);\n return;\n }\n }\n\n /**\n * Get a list of all maps registered.\n * @returns An array of maps.\n */\n export function values(): MapInterface[] {\n return Array.from(registeredMaps.values());\n }\n\n /**\n * Check if a map is registered.\n * @param id The id of the map.\n * @returns True if the map is registered, false otherwise.\n */\n export function has(id: string): boolean {\n return registeredMaps.has(id);\n }\n}\nexport default RegisteredMaps;\n","import { CachedMap } from \"@drincs/pixi-vn\";\nimport { QuestInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\n/**\n * A Map that contains all quests registered and available to be used.\n * The key is the id of the quest and the value is the quest itself.\n */\nconst registeredQuests = new CachedMap<string, QuestInterface>({ cacheSize: 5 });\n\nnamespace RegisteredQuest {\n /**\n * Save a quest in the registered quests. If the quest already exists, it will be overwritten.\n * @param quest The quest to save.\n * @returns\n */\n export function add(quests: QuestInterface | QuestInterface[]) {\n if (Array.isArray(quests)) {\n quests.forEach((quest) => RegisteredQuest.add(quest));\n return;\n }\n registeredQuests.set(quests.id, quests);\n }\n /**\n * Get a quest by its id.\n * @param id The id of the quest.\n * @returns The quest or undefined if not found.\n */\n export function get(id: string): QuestInterface | undefined {\n try {\n let quest = registeredQuests.get(id);\n if (!quest) {\n console.warn(`[NQTR] Quest ${id} not found, you should register it first`);\n return;\n }\n return quest;\n } catch (e) {\n logger.error(`Error while getting Quest ${id}`, e);\n return;\n }\n }\n /**\n * Get a list of all quests registered.\n * @returns An array of quests.\n */\n export function values(): QuestInterface[] {\n return Array.from(registeredQuests.values());\n }\n /**\n * Check if a quest is registered.\n * @param id The id of the quest.\n * @returns True if the quest is registered, false otherwise.\n */\n export function has(id: string): boolean {\n return registeredQuests.has(id);\n }\n}\nexport default RegisteredQuest;\n","import { CachedMap } from \"@drincs/pixi-vn\";\nimport { RoomInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\nimport RegisteredLocations from \"./RegisteredLocations\";\nimport RegisteredMaps from \"./RegisteredMaps\";\n\n/**\n * A Map that contains all rooms registered and available to be used.\n * The key is the id of the room and the value is the room itself.\n */\nconst registeredRooms = new CachedMap<string, RoomInterface>({ cacheSize: 20 });\n\nnamespace RegisteredRooms {\n /**\n * Save a room in the registered rooms, and their location and map if they are not already registered.\n * If the room already exists, it will be overwritten.\n * @param room The room to save.\n * @returns\n */\n export function add(room: RoomInterface | RoomInterface[]) {\n if (Array.isArray(room)) {\n room.forEach((c) => add(c));\n return;\n }\n registeredRooms.set(room.id, room);\n let location = room.location;\n RegisteredLocations.add(location);\n let map = location?.map;\n if (map) {\n RegisteredMaps.add(map);\n }\n }\n\n /**\n * Get a room by its id.\n * @param id The id of the room.\n * @returns The room or undefined if not found.\n */\n export function get(id: string): RoomInterface | undefined {\n try {\n let room = registeredRooms.get(id);\n if (!room) {\n console.warn(`[NQTR] Room ${id} not found, you should register it first`);\n return;\n }\n return room;\n } catch (e) {\n logger.error(`Error while getting Room ${id}`, e);\n return;\n }\n }\n\n /**\n * Get a list of all rooms registered.\n * @returns An array of rooms.\n */\n export function values(): RoomInterface[] {\n return Array.from(registeredRooms.values());\n }\n\n /**\n * Check if a room is registered.\n * @param id The id of the room.\n * @returns True if the room is registered, false otherwise.\n */\n export function has(id: string): boolean {\n return registeredRooms.has(id);\n }\n}\nexport default RegisteredRooms;\n","import { storage } from \"@drincs/pixi-vn\";\nimport { LATEST_EVENT_MEMORY_KEY } from \"../constants\";\nimport LastEventType from \"../types/LastEventType\";\n\nexport function setLastEvent(event: LastEventType) {\n storage.setVariable(LATEST_EVENT_MEMORY_KEY, event);\n}\nexport function getLastEvent() {\n return storage.getVariable<LastEventType>(LATEST_EVENT_MEMORY_KEY);\n}\n","import { storage } from \"@drincs/pixi-vn\";\nimport { CURRENT_ROOM_MEMORY_KEY } from \"../constants\";\nimport { RegisteredLocations, RegisteredMaps, RegisteredRooms } from \"../decorators\";\nimport { setLastEvent } from \"../functions/tracking-changes\";\nimport { LocationInterface, MapInterface, RoomInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\nexport default class NavigatorManager {\n get rooms() {\n return RegisteredRooms.values();\n }\n get locations() {\n return RegisteredLocations.values();\n }\n get maps() {\n return RegisteredMaps.values();\n }\n get currentRoomId(): string | undefined {\n return storage.getVariable<string>(CURRENT_ROOM_MEMORY_KEY);\n }\n get currentRoom(): RoomInterface | undefined {\n let roomId = this.currentRoomId;\n if (!roomId) {\n logger.error(`The current room has not yet been set`);\n return;\n }\n let room = RegisteredRooms.get(roomId);\n if (!room) {\n logger.error(`Current room ${roomId} not found`);\n return;\n }\n return room;\n }\n set currentRoom(room: RoomInterface | string) {\n if (typeof room !== \"string\") {\n room = room.id;\n }\n let roomRegistrated = RegisteredRooms.get(room);\n if (!roomRegistrated) {\n logger.error(`The room ${room} is not registered, so it can't be set as current room`);\n return;\n }\n let prevRoom = storage.getVariable<string>(CURRENT_ROOM_MEMORY_KEY);\n if (prevRoom === room) {\n return;\n }\n\n setLastEvent({\n type: \"editroom\",\n prev: prevRoom,\n value: room,\n });\n storage.setVariable(CURRENT_ROOM_MEMORY_KEY, room);\n }\n get currentLocation(): LocationInterface | undefined {\n return this.currentRoom?.location;\n }\n get currentMap(): MapInterface | undefined {\n return this.currentRoom?.location.map;\n }\n /**\n * Clear all the expired activities.\n */\n clearExpiredActivities() {\n RegisteredRooms.values().forEach((room) => {\n room.clearExpiredActivities();\n });\n }\n}\n","import { OnRunProps } from \"@drincs/nqtr\";\nimport RegisteredQuest from \"../decorators/RegisteredQuests\";\nimport { QuestInterface } from \"../interface\";\n\nexport default class QuestManager {\n /**\n * The quests registered in the game.\n */\n get quests(): QuestInterface[] {\n return RegisteredQuest.values();\n }\n /**\n * The quests that are started, so they are in progress or completed or failed.\n */\n get startedQuests(): QuestInterface[] {\n return this.quests.filter((quest) => quest.started);\n }\n /**\n * The quests that are in progress.\n */\n get inProgressQuests(): QuestInterface[] {\n return this.quests.filter((quest) => quest.inProgress);\n }\n /**\n * The quests that are completed.\n */\n get completedQuests(): QuestInterface[] {\n return this.quests.filter((quest) => quest.completed);\n }\n /**\n * The quests that are failed.\n */\n get failedQuests(): QuestInterface[] {\n return this.quests.filter((quest) => quest.failed);\n }\n /**\n * The quests that are not started.\n */\n get notStartedQuests(): QuestInterface[] {\n return this.quests.filter((quest) => !quest.started);\n }\n /**\n * Get the quest by the id.\n * @param id The id of the quest.\n * @returns The quest with the id.\n */\n find(id: string): QuestInterface | undefined {\n return RegisteredQuest.get(id);\n }\n\n /**\n * Start the quests that must start on the current stage.\n */\n async startsStageMustBeStarted(props: OnRunProps) {\n let promises: Promise<void>[] = this.quests.map((quest) => {\n if (quest.currentStageMustStart) {\n return quest.startCurrentStage(props);\n }\n return Promise.resolve();\n });\n await Promise.all(promises);\n }\n}\n","import { CharacterInterface, storage } from \"@drincs/pixi-vn\";\nimport RegisteredCommitments, { fixedCommitments, registeredCommitments } from \"../decorators/RegisteredCommitments\";\nimport { CommitmentInterface } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\n\nconst TEMPORARY_COMMITMENT_CATEGORY_MEMORY_KEY = \"___nqtr-temporary_commitment___\";\nexport default class RoutineManager {\n get fixedRoutine(): CommitmentInterface[] {\n return [...fixedCommitments.values()];\n }\n /**\n * Set a commitment as fixed, it will be always available. They cannot be deleted or edit during the game session.\n */\n set fixedRoutine(commitments: CommitmentInterface[]) {\n commitments.forEach((c) => {\n if (fixedCommitments.has(c.id)) {\n console.warn(`[NQTR] Commitment id ${c.id} already exists, it will be overwritten`);\n }\n fixedCommitments.set(c.id, c);\n });\n }\n\n /**\n * Get the temporary commitments by its id.\n * @returns The temporary commitments.\n */\n get temporaryRoutine(): CommitmentInterface[] {\n let commitmentsIds = storage.getVariable<string[]>(TEMPORARY_COMMITMENT_CATEGORY_MEMORY_KEY);\n if (!commitmentsIds) {\n return [];\n }\n let commitments = commitmentsIds\n .map((id) => RegisteredCommitments.get(id))\n .filter((commitment) => commitment !== undefined);\n return commitments;\n }\n\n get allRoutine(): CommitmentInterface[] {\n return [...this.fixedRoutine, ...this.temporaryRoutine];\n }\n\n /**\n * This feature adds the commitments during the game session.\n * @param commitment The commitment or commitments to add.\n */\n add(commitment: CommitmentInterface[] | CommitmentInterface) {\n if (!Array.isArray(commitment)) {\n commitment = [commitment];\n }\n let commitmentsIds = commitment\n .map((commitment) => {\n let commitmentTest = RegisteredCommitments.get(commitment.id);\n if (!commitmentTest) {\n console.warn(`[NQTR] Commitment ${commitment.id} not found, it will be ignored`);\n return undefined;\n }\n return commitment.id;\n })\n .filter((id) => id !== undefined);\n\n storage.setVariable(TEMPORARY_COMMITMENT_CATEGORY_MEMORY_KEY, commitmentsIds);\n }\n\n /**\n * Get the commitments added during the game session.\n * @param id The id of the commitment.\n * @returns The commitment or undefined if not found.\n */\n find(id: string): CommitmentInterface | undefined {\n return RegisteredCommitments.get(id);\n }\n\n /**\n * Remove the commitments added during the game session.\n * @param commitment The commitment or commitments to remove.\n */\n remove(commitment: CommitmentInterface[] | CommitmentInterface) {\n if (!Array.isArray(commitment)) {\n commitment = [commitment];\n }\n let commitmentsIds = commitment.map((commitment) => {\n return commitment.id;\n });\n\n let currentCommitments = storage.getVariable<string[]>(TEMPORARY_COMMITMENT_CATEGORY_MEMORY_KEY);\n if (!currentCommitments) {\n return;\n }\n currentCommitments = currentCommitments.filter((id) => !commitmentsIds.includes(id));\n storage.setVariable(TEMPORARY_COMMITMENT_CATEGORY_MEMORY_KEY, currentCommitments);\n }\n\n /**\n * Clear all the expired commitments.\n */\n clearExpiredRoutine() {\n RegisteredCommitments.values().forEach((commitment) => {\n if (commitment.expired) {\n registeredCommitments.delete(commitment.id);\n }\n });\n }\n\n /**\n * Get the current commitments. The hidden commitments are not included.\n * In case there is a character who has two or more commitments at the same time, will be selected the commitment with the highest priority.\n * Higher priority commitments are calculated using the following steps:\n * 1. The commitments that have Commitments BaseModel.priority set to a higher value will be selected first.\n * 2. If there are commitments with the same priority, the commitments that are not fixed will be selected first.\n * 3. If there are commitments with the same priority and the same fixed status, priority will be given to the commitment with a lower index.\n * @returns The current commitments.\n */\n get currentRoutine(): CommitmentInterface[] {\n let character_commitments: { [character: string]: CommitmentInterface } = {};\n [...this.fixedRoutine, ...this.temporaryRoutine].forEach((c) => {\n if (c.isActive) {\n if (c.characters.length > 0) {\n // all the characters don't already have commitments or the commitment has a higher priority\n let allAvailable = c.characters.every(\n (ch) => !character_commitments[ch.id] || c.priority > character_commitments[ch.id].priority\n );\n if (allAvailable) {\n c.characters.forEach((ch) => {\n character_commitments[ch.id] = c;\n });\n }\n } else {\n logger.error(`The commitment ${c.id} has no characters assigned`);\n }\n }\n });\n return Object.values(character_commitments);\n }\n\n /**\n * Get the character commitment.\n * @param character The character.\n * @returns The commitment or undefined if not found.\n */\n getCommitmentByCharacter(character: CharacterInterface): CommitmentInterface | undefined {\n this.currentRoutine.forEach((c) => {\n if (c.characters.map((ch) => ch.id).includes(character.id)) {\n return c;\n }\n });\n return undefined;\n }\n}\n","import { TimeSettings, TimeSlotInterface } from \"../types/TimeSettings\";\n\nexport default class TimeManagerSettings implements TimeSettings {\n static dayStartTime: number = 0;\n static dayEndTime: number = 24;\n static defaultTimeSpent: number = 1;\n static timeSlots: TimeSlotInterface[] = [];\n static weekLength: number = 7;\n static weekendStartDay: number = this.weekLength - 1;\n static getDayName?: (weekDayNumber: number) => string;\n}\n","import { storage } from \"@drincs/pixi-vn\";\nimport { TIME_DATA_KEY } from \"../constants\";\nimport { setLastEvent } from \"../functions/tracking-changes\";\nimport TimeDataType from \"../types/TimeDataType\";\nimport { TimeSettings, TimeSlotInterface } from \"../types/TimeSettings\";\nimport TimeManagerSettings from \"./TimeManagerSettings\";\n\nexport default class TimeManager {\n initialize(settings: TimeSettings) {\n const {\n dayStartTime = 0,\n dayEndTime = 24,\n defaultTimeSpent = 1,\n timeSlots = [],\n weekLength = 7,\n weekendStartDay = weekLength - 1,\n getDayName,\n } = settings;\n TimeManagerSettings.dayStartTime = dayStartTime;\n TimeManagerSettings.dayEndTime = dayEndTime;\n TimeManagerSettings.defaultTimeSpent = defaultTimeSpent;\n TimeManagerSettings.timeSlots = timeSlots;\n TimeManagerSettings.weekLength = weekLength;\n if (weekendStartDay >= TimeManagerSettings.weekLength) {\n console.warn(`[NQTR] Weekend start day should be less than week length ${weekLength}, so will be ignored`);\n } else {\n TimeManagerSettings.weekendStartDay = weekendStartDay;\n }\n TimeManagerSettings.getDayName = getDayName;\n }\n get dayStartTime(): number {\n return TimeManagerSettings.dayStartTime;\n }\n get dayEndTime(): number {\n return TimeManagerSettings.dayEndTime;\n }\n get defaultTimeSpent(): number {\n return TimeManagerSettings.defaultTimeSpent;\n }\n get timeSlots(): TimeSlotInterface[] {\n return TimeManagerSettings.timeSlots;\n }\n get weekLength(): number {\n return TimeManagerSettings.weekLength;\n }\n get weekendStartDay(): number {\n return TimeManagerSettings.weekendStartDay;\n }\n /**\n * Week days name\n * @param weekDayNumber The current week day number (from: 0 - to: {@link weekLength} - 1).\n * @returns The name of the week day.\n * @example\n * ```ts\n * (weekDayNumber: number) => {\n * const weekDaysNames = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];\n * return weekDaysNames[weekDayNumber];\n * }\n * ```\n */\n get getDayName() {\n return TimeManagerSettings.getDayName;\n }\n\n /**\n * Get the current time. Time is a numeric variable used to determine and manage time during a day/date.\n * It's recommended to use currentTime as if it were the current time. If you also want to manage minutes, you can use a float value.\n */\n get currentTime(): number {\n let data = storage.getVariable<TimeDataType>(TIME_DATA_KEY) || {};\n if (data.hasOwnProperty(\"currentTime\") && typeof data.currentTime === \"number\") {\n return data.currentTime;\n }\n return this.dayStartTime;\n }\n set currentTime(value: number | undefined) {\n let prev = storage.getVariable<TimeDataType>(TIME_DATA_KEY) || {};\n let data = { ...prev };\n if (typeof value === \"number\") {\n data.currentTime = value;\n } else {\n delete data.currentTime;\n }\n setLastEvent({\n type: \"edittime\",\n prev: prev,\n value: data,\n });\n storage.setVariable(TIME_DATA_KEY, data);\n }\n /**\n * Get the current date. Date is a numeric variable used to determine and manage the number of days passed.\n * It's recommended to use currentDate as if it were the current day.\n */\n get currentDate(): number {\n let data = storage.getVariable<TimeDataType>(TIME_DATA_KEY) || {};\n if (data.hasOwnProperty(\"currentDate\") && typeof data.currentDate === \"number\") {\n return data.currentDate;\n }\n return 0;\n }\n set currentDate(value: number | undefined) {\n let prev = storage.getVariable<TimeDataType>(TIME_DATA_KEY) || {};\n let data = { ...prev };\n if (typeof value === \"number\") {\n data.currentDate = value;\n } else {\n delete data.currentDate;\n }\n setLastEvent({\n type: \"edittime\",\n prev: prev,\n value: data,\n });\n storage.setVariable(TIME_DATA_KEY, data);\n }\n /**\n * If the current day is greater than or equal to the weekend start day, then it will return true.\n */\n get isWeekend(): boolean {\n return this.currentWeekDayNumber >= this.weekendStartDay;\n }\n /**\n * Get the current week day number (from: 1 - to: {@link weekLength}).\n * For example, if the week length is 7 and the current day is 10, then the result will be 4.\n */\n get currentWeekDayNumber(): number {\n let result = this.currentDate % this.weekLength;\n return result + 1;\n }\n /**\n * Get the current week day name. If the week days names are not defined, then it will return undefined.\n * For example, if the week days names are ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'] and the current day is 10, then the result will be 'Thursday'.\n * @default \"\"\n */\n get currentDayName(): string {\n if (!this.getDayName) {\n console.warn(`[NQTR] Week days names are not defined, so currentDayName will be empty`);\n return \"\";\n }\n return this.getDayName(this.currentWeekDayNumber - 1);\n }\n /**\n * Get the current {@link timeSlots} index.\n * You can use this property to create \"Image that changes based on the time period\":\n * @example\n * ```tsx\n * import { weekLength } from '@drincs/nqtr';\n *\n * function changeBackground() {\n * return (\n * <img src={`background-currentTimeSlot.currentTimeSlot.png`} />\n * )\n * }\n */\n get currentTimeSlot(): number {\n if (this.timeSlots.length === 0) {\n console.warn(\"[NQTR] Time slots are not defined\");\n return 0;\n }\n for (let index = 0; index < this.timeSlots.length; index++) {\n let slot = this.timeSlots[index];\n if (this.timeSlots.length > index + 1) {\n if (this.nowIsBetween(slot.startTime, this.timeSlots[index + 1].startTime)) {\n return index;\n }\n }\n }\n return this.timeSlots.length - 1;\n }\n\n /**\n * This function will increase the current time by the given time spent.\n * If the new time is greater than or equal to the max day times, then it will increase the day and set the new time.\n * @param delta is the time spent in times (default: {@link defaultTimeSpent})\n * @returns currentTimeSlot.currentTime\n */\n increaseTime(delta: number = this.defaultTimeSpent): number {\n let newTime = this.currentTime + delta;\n if (newTime >= this.dayEndTime) {\n this.increaseDate();\n newTime = this.dayStartTime + (newTime - this.dayEndTime);\n }\n this.currentTime = newTime;\n return this.currentTime;\n }\n\n /**\n * This function will increase the current date by the given delta.\n * @param delta is the number of days to increase (default: 1)\n * @param time is the time of the new day (default: {@link dayStartTime})\n * @returns timeTracker.currentDate\n */\n increaseDate(delta: number = 1, time: number = this.dayStartTime): number {\n let newDate = this.currentDate + delta;\n this.currentDate = newDate;\n this.currentTime = time;\n return this.currentDate;\n }\n\n /**\n * This function will check if the current time is between the given times.\n * @param fromTime the starting time. If the {@link currentTime} is equal to this time, the function will return true.\n * @param toTime the ending time.\n * @returns true if the current time is between the given times, otherwise false.\n */\n nowIsBetween(fromTime: number | undefined, toTime: number | undefined): boolean {\n if (fromTime === undefined) {\n fromTime = this.dayStartTime - 1;\n }\n if (toTime === undefined) {\n toTime = this.dayEndTime + 1;\n }\n let currentTime = this.currentTime;\n if (fromTime < toTime) {\n return currentTime >= fromTime && currentTime < toTime;\n }\n return currentTime >= fromTime || currentTime < toTime;\n }\n}\n","import NavigatorManager from \"./NavigatorManager\";\nimport QuestManager from \"./QuestManager\";\nimport RoutineManager from \"./RoutineManager\";\nimport { default as TimeManager } from \"./TimeManager\";\n\nconst timeTracker = new TimeManager();\nconst navigator = new NavigatorManager();\nconst routine = new RoutineManager();\nconst questsNotebook = new QuestManager();\n\nexport { navigator, questsNotebook, routine, timeTracker };\n"]}
@@ -1,4 +1,4 @@
1
- export { E as ExecutionType, O as OnRunAsyncFunction, a as OnRunEvent, b as OnRunFunction, c as OnRunProps, d as QuestsRequiredType } from '../StageInterface-C1Zfcpk3.mjs';
1
+ export { E as ExecutionType, O as OnRunAsyncFunction, a as OnRunEvent, b as OnRunFunction, c as OnRunProps, d as QuestsRequiredType } from '../StageInterface-v96_K9Tg.mjs';
2
2
  import '@drincs/nqtr';
3
3
 
4
4
  type TimeSlotInterface = {
@@ -1,4 +1,4 @@
1
- export { E as ExecutionType, O as OnRunAsyncFunction, a as OnRunEvent, b as OnRunFunction, c as OnRunProps, d as QuestsRequiredType } from '../StageInterface-C1Zfcpk3.js';
1
+ export { E as ExecutionType, O as OnRunAsyncFunction, a as OnRunEvent, b as OnRunFunction, c as OnRunProps, d as QuestsRequiredType } from '../StageInterface-v96_K9Tg.js';
2
2
  import '@drincs/nqtr';
3
3
 
4
4
  type TimeSlotInterface = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drincs/nqtr",
3
- "version": "0.5.4",
3
+ "version": "0.5.6",
4
4
  "description": "A complete system introducing the concepts of location, time and event, producing the framework of a not-quite-point-and-click adventure game.",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",