From bda6d66e92153e1d8dda812ba0d348f3c0b7b28d Mon Sep 17 00:00:00 2001 From: Dev Date: Wed, 13 Dec 2023 22:16:21 +0000 Subject: [PATCH] Log names of files being serialsied --- project/src/controllers/RepeatableQuestController.ts | 4 +++- project/src/loaders/PreAkiModLoader.ts | 10 ++++++---- project/src/services/HashCacheService.ts | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/project/src/controllers/RepeatableQuestController.ts b/project/src/controllers/RepeatableQuestController.ts index fa96dbce..5db3cf36 100644 --- a/project/src/controllers/RepeatableQuestController.ts +++ b/project/src/controllers/RepeatableQuestController.ts @@ -81,7 +81,9 @@ export class RepeatableQuestController * (if the are on "Succeed" but not "Completed" we keep them, to allow the player to complete them and get the rewards) * The new quests generated are again persisted in profile.RepeatableQuests * - * @param {string} sessionId Player's session id + * @param {string} _info Request from client + * @param {string} sessionID Player's session id + * * @returns {array} array of "repeatableQuestObjects" as descibed above */ public getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[] diff --git a/project/src/loaders/PreAkiModLoader.ts b/project/src/loaders/PreAkiModLoader.ts index d06f89e5..0d49e9ab 100644 --- a/project/src/loaders/PreAkiModLoader.ts +++ b/project/src/loaders/PreAkiModLoader.ts @@ -429,9 +429,10 @@ export class PreAkiModLoader implements IModLoader public sortModsLoadOrder(): string[] { // if loadorder.json exists: load it, otherwise generate load order - if (this.vfs.exists(`${this.basepath}loadorder.json`)) + const loadOrderPath = `${this.basepath}loadorder.json` + if (this.vfs.exists(loadOrderPath)) { - return this.jsonUtil.deserialize(this.vfs.readFile(`${this.basepath}loadorder.json`)); + return this.jsonUtil.deserialize(this.vfs.readFile(loadOrderPath), loadOrderPath); } else { @@ -661,14 +662,15 @@ export class PreAkiModLoader implements IModLoader } // Check if config exists - if (!this.vfs.exists(`${modPath}/package.json`)) + const modPackagePath = `${modPath}/package.json`; + if (!this.vfs.exists(modPackagePath)) { this.logger.error(this.localisationService.getText("modloader-missing_package_json", modName)); return false; } // Validate mod - const config = this.jsonUtil.deserialize(this.vfs.readFile(`${modPath}/package.json`)); + const config = this.jsonUtil.deserialize(this.vfs.readFile(modPackagePath), modPackagePath); const checks = ["name", "author", "version", "license"]; let issue = false; diff --git a/project/src/services/HashCacheService.ts b/project/src/services/HashCacheService.ts index a2c629d0..6b98f7ec 100644 --- a/project/src/services/HashCacheService.ts +++ b/project/src/services/HashCacheService.ts @@ -27,7 +27,7 @@ export class HashCacheService // get mod hash file if (!this.modHashes) { // empty - this.modHashes = this.jsonUtil.deserialize(this.vfs.readFile(`${this.modCachePath}`)); + this.modHashes = this.jsonUtil.deserialize(this.vfs.readFile(`${this.modCachePath}`), this.modCachePath); } }