From c2a1fba795b036659b6f2f4a047ebf3ba0dd2abe Mon Sep 17 00:00:00 2001 From: Chomp Date: Sat, 30 Nov 2024 22:29:09 +0000 Subject: [PATCH] Updated types --- README.md | 2 +- .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ .../types/helpers/QuestHelper.d.ts | 8 ++++ .../types/models/eft/health/IWorkoutData.d.ts | 1 - .../types/services/ProfileFixerService.d.ts | 18 ++++++++- .../utils/DatabaseDecompressionUtil.d.ts | 38 +++++++++++++++++++ 113 files changed, 1765 insertions(+), 57 deletions(-) create mode 100644 TypeScript/10ScopesAndTypes/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/13.1AddTraderWithAssortJSON/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/13AddTrader/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/16ImporterUtil/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/18.1CustomItemServiceLootBox/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/18CustomItemService/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/1LogToConsole/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/20CustomChatBot/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/22CustomSptCommand/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/23CustomAbstractChatBot/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/24WebSocket/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/2EditDatabase/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/7OnLoadHook/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/utils/DatabaseDecompressionUtil.d.ts create mode 100644 TypeScript/9RouterHooks/types/utils/DatabaseDecompressionUtil.d.ts diff --git a/README.md b/README.md index 7e3f3af..d816071 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Mod examples for v3.10.0 +# Mod examples for v3.10.1 A collection of example mods that perform typical actions in SPT diff --git a/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts b/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/10ScopesAndTypes/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/10ScopesAndTypes/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts b/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/11BundleLoadingSample/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/11BundleLoadingSample/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/12ClassExtensionOverride/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/QuestHelper.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/QuestHelper.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/ProfileFixerService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/ProfileFixerService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts b/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/13AddTrader/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/13AddTrader/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/13AddTrader/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts b/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts +++ b/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/13AddTrader/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/13AddTrader/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/13AddTrader/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/14AfterDBLoadHook/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/14AfterDBLoadHook/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/15HttpListenerExample/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts b/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/15HttpListenerExample/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/15HttpListenerExample/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/16ImporterUtil/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts b/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/16ImporterUtil/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/16ImporterUtil/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/17AsyncImporterWithDependency1/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/17AsyncImporterWithDependency2/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/QuestHelper.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/QuestHelper.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/ProfileFixerService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/ProfileFixerService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/18.1CustomItemServiceLootBox/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/18CustomItemService/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/18CustomItemService/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/18CustomItemService/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts b/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts +++ b/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/18CustomItemService/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/18CustomItemService/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/18CustomItemService/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/19UseExternalLibraries/types/helpers/QuestHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/QuestHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts b/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/19UseExternalLibraries/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/19UseExternalLibraries/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/1LogToConsole/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/1LogToConsole/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/1LogToConsole/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts b/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts +++ b/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/1LogToConsole/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/1LogToConsole/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/1LogToConsole/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/20CustomChatBot/types/helpers/QuestHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/20CustomChatBot/types/helpers/QuestHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/20CustomChatBot/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/20CustomChatBot/types/services/ProfileFixerService.d.ts b/TypeScript/20CustomChatBot/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/20CustomChatBot/types/services/ProfileFixerService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/20CustomChatBot/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/20CustomChatBot/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/QuestHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/QuestHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/21CustomCommandoCommand/types/services/ProfileFixerService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/ProfileFixerService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/21CustomCommandoCommand/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/21CustomCommandoCommand/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/22CustomSptCommand/types/helpers/QuestHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/22CustomSptCommand/types/helpers/QuestHelper.d.ts +++ b/TypeScript/22CustomSptCommand/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/22CustomSptCommand/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/22CustomSptCommand/types/services/ProfileFixerService.d.ts b/TypeScript/22CustomSptCommand/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/22CustomSptCommand/types/services/ProfileFixerService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/22CustomSptCommand/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/22CustomSptCommand/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/22CustomSptCommand/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/QuestHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/QuestHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/23CustomAbstractChatBot/types/services/ProfileFixerService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/ProfileFixerService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/24WebSocket/types/helpers/QuestHelper.d.ts b/TypeScript/24WebSocket/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/24WebSocket/types/helpers/QuestHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/24WebSocket/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/24WebSocket/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/24WebSocket/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/24WebSocket/types/services/ProfileFixerService.d.ts b/TypeScript/24WebSocket/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/24WebSocket/types/services/ProfileFixerService.d.ts +++ b/TypeScript/24WebSocket/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/24WebSocket/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/24WebSocket/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/24WebSocket/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/2EditDatabase/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/2EditDatabase/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/2EditDatabase/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts b/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts +++ b/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/2EditDatabase/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/2EditDatabase/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/2EditDatabase/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/3GetSptConfigFile/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/3GetSptConfigFile/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/QuestHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/QuestHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/4UseACustomConfigFile/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/5ReplaceMethod/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts b/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/5ReplaceMethod/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/5ReplaceMethod/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/7OnLoadHook/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts b/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/7OnLoadHook/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/7OnLoadHook/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/8OnUpdateHook/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts b/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/8OnUpdateHook/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/8OnUpdateHook/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +} diff --git a/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts index cfb1be4..52aad0a 100644 --- a/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; +import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; @@ -280,6 +281,13 @@ export declare class QuestHelper { * @param response Response to send back to client */ protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; + /** + * Find hideout craft id for the specified quest reward + * @param craftUnlockReward + * @param questDetails + * @returns + */ + getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[]; /** * Get players money reward bonus from profile * @param pmcData player profile diff --git a/TypeScript/9RouterHooks/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/9RouterHooks/types/models/eft/health/IWorkoutData.d.ts index d958b74..ee14206 100644 --- a/TypeScript/9RouterHooks/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/health/IWorkoutData.d.ts @@ -1,6 +1,5 @@ export interface IWorkoutData extends Record { skills: IWorkoutSkills; - effects: IWorkoutEffects; } export interface IWorkoutSkills { Common: IWorkoutSkillCommon[]; diff --git a/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts b/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts index 6ffda1b..ccb9d07 100644 --- a/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts +++ b/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts @@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; +import { IQuest, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; @@ -36,9 +38,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected configServer: ConfigServer; protected cloner: ICloner; + protected questHelper: QuestHelper; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner, questHelper: QuestHelper); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix @@ -71,6 +74,19 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * Verify that all quest production unlocks have been applied to the PMC Profile + * @param pmcProfile The profile to validate quest productions for + */ + protected verifyQuestProductionUnlocks(pmcProfile: IPmcData): void; + /** + * Validate that the given profile has the given quest reward production scheme unlocked, and add it if not + * @param pmcProfile Profile to check + * @param productionUnlockReward The quest reward to validate + * @param questDetails The quest the reward belongs to + * @returns + */ + protected verifyQuestProductionUnlock(pmcProfile: IPmcData, productionUnlockReward: IQuestReward, questDetails: IQuest): void; /** * If the profile has elite Hideout Managment skill, add the additional slots from globals * NOTE: This seems redundant, but we will leave it here just incase. diff --git a/TypeScript/9RouterHooks/types/utils/DatabaseDecompressionUtil.d.ts b/TypeScript/9RouterHooks/types/utils/DatabaseDecompressionUtil.d.ts new file mode 100644 index 0000000..b6722d1 --- /dev/null +++ b/TypeScript/9RouterHooks/types/utils/DatabaseDecompressionUtil.d.ts @@ -0,0 +1,38 @@ +import { ILogger } from "@spt/models/spt/utils/ILogger"; +export declare class DatabaseDecompressionUtil { + protected logger: ILogger; + private compressedDir; + private assetsDir; + private compiled; + constructor(logger: ILogger); + /** + * Checks if the application is running in a compiled environment. A simple check is done to see if the relative + * assets directory exists. If it does not, the application is assumed to be running in a compiled environment. All + * relative asset paths are different within a compiled environment, so this simple check is sufficient. + */ + private isCompiled; + /** + * Initializes the database compression utility. + * + * This method will decompress all 7-zip archives within the compressed database directory. The decompressed files + * are placed in their respective directories based on the name and location of the compressed file. + */ + initialize(): Promise; + /** + * Retrieves a list of all 7-zip archives within the compressed database directory. + */ + private getCompressedFiles; + /** + * Processes a compressed file by checking if the target directory is empty, and if so, decompressing the file into + * the target directory. + */ + private processCompressedFile; + /** + * Checks if a directory exists and is empty. + */ + private isDirectoryEmpty; + /** + * Decompresses a 7-zip archive to the target directory. + */ + private decompressFile; +}