Updated types

This commit is contained in:
Chomp 2024-11-30 22:29:09 +00:00
parent 67b3fe203f
commit c2a1fba795
113 changed files with 1765 additions and 57 deletions

View File

@ -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 A collection of example mods that perform typical actions in SPT

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

View File

@ -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<void>;
/**
* 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;
}

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

View File

@ -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<void>;
/**
* 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;
}

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

View File

@ -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<void>;
/**
* 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;
}

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

View File

@ -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<void>;
/**
* 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;
}

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

View File

@ -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<void>;
/**
* 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;
}

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

View File

@ -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<void>;
/**
* 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;
}

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

View File

@ -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<void>;
/**
* 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;
}

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

View File

@ -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<void>;
/**
* 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;
}

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

View File

@ -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<void>;
/**
* 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;
}

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

View File

@ -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<void>;
/**
* 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;
}

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

View File

@ -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<void>;
/**
* 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;
}

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

View File

@ -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<void>;
/**
* 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;
}

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

View File

@ -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<void>;
/**
* 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;
}

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

View File

@ -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<void>;
/**
* 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;
}

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

View File

@ -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<void>;
/**
* 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;
}

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

View File

@ -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<void>;
/**
* 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;
}

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

View File

@ -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<void>;
/**
* 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;
}

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

View File

@ -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<void>;
/**
* 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;
}

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

View File

@ -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<void>;
/**
* 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;
}

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

View File

@ -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<void>;
/**
* 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;
}

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

View File

@ -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<void>;
/**
* 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;
}

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

View File

@ -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<void>;
/**
* 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;
}

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

View File

@ -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<void>;
/**
* 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;
}

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

View File

@ -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<void>;
/**
* 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;
}

View File

@ -10,6 +10,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { Common, IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; 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 { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -280,6 +281,13 @@ export declare class QuestHelper {
* @param response Response to send back to client * @param response Response to send back to client
*/ */
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void; 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 * Get players money reward bonus from profile
* @param pmcData player profile * @param pmcData player profile

View File

@ -1,6 +1,5 @@
export interface IWorkoutData extends Record<string, any> { export interface IWorkoutData extends Record<string, any> {
skills: IWorkoutSkills; skills: IWorkoutSkills;
effects: IWorkoutEffects;
} }
export interface IWorkoutSkills { export interface IWorkoutSkills {
Common: IWorkoutSkillCommon[]; Common: IWorkoutSkillCommon[];

View File

@ -2,9 +2,11 @@ import { HideoutHelper } from "@spt/helpers/HideoutHelper";
import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { InventoryHelper } from "@spt/helpers/InventoryHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; 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 { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
@ -36,9 +38,10 @@ export declare class ProfileFixerService {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questHelper: QuestHelper;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; 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 * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -71,6 +74,19 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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 * 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. * NOTE: This seems redundant, but we will leave it here just incase.

Some files were not shown because too many files have changed in this diff Show More