diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/DataCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/10ScopesAndTypes/types/controllers/WeatherController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/WeatherController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/10ScopesAndTypes/types/helpers/WeatherHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/10ScopesAndTypes/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/hideout/IHideout.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts b/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts b/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/DataCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/11BundleLoadingSample/types/controllers/WeatherController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/WeatherController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/11BundleLoadingSample/types/helpers/WeatherHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/11BundleLoadingSample/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/hideout/IHideout.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts b/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts b/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/DataCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/WeatherController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/WeatherController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/12ClassExtensionOverride/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/WeatherHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/hideout/IHideout.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/DataCallbacks.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/WeatherController.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/WeatherController.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/QuestHelper.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/QuestHelper.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/WeatherHelper.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/hideout/IHideout.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/ProfileFixerService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/ProfileFixerService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/SeasonalEventService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/SeasonalEventService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/13AddTrader/types/callbacks/DataCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/13AddTrader/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/13AddTrader/types/controllers/WeatherController.d.ts b/TypeScript/13AddTrader/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/13AddTrader/types/controllers/WeatherController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/13AddTrader/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/13AddTrader/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/13AddTrader/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts b/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/13AddTrader/types/helpers/WeatherHelper.d.ts b/TypeScript/13AddTrader/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/13AddTrader/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/13AddTrader/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/13AddTrader/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/13AddTrader/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/13AddTrader/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/13AddTrader/types/models/spt/hideout/IHideout.d.ts b/TypeScript/13AddTrader/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/13AddTrader/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts b/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts +++ b/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts b/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts +++ b/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/DataCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/WeatherController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/WeatherController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/14AfterDBLoadHook/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/WeatherHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/hideout/IHideout.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/15HttpListenerExample/types/callbacks/DataCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/15HttpListenerExample/types/controllers/WeatherController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/WeatherController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/15HttpListenerExample/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/15HttpListenerExample/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/15HttpListenerExample/types/helpers/WeatherHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/15HttpListenerExample/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/15HttpListenerExample/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/hideout/IHideout.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts b/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts b/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/16ImporterUtil/types/callbacks/DataCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/16ImporterUtil/types/controllers/WeatherController.d.ts b/TypeScript/16ImporterUtil/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/16ImporterUtil/types/controllers/WeatherController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/16ImporterUtil/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/16ImporterUtil/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/16ImporterUtil/types/helpers/WeatherHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/16ImporterUtil/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/16ImporterUtil/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/16ImporterUtil/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/16ImporterUtil/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/16ImporterUtil/types/models/spt/hideout/IHideout.d.ts b/TypeScript/16ImporterUtil/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts b/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts b/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/DataCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/WeatherController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/WeatherController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/WeatherHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/hideout/IHideout.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/DataCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/WeatherController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/WeatherController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/WeatherHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/hideout/IHideout.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/DataCallbacks.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/WeatherController.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/WeatherController.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/QuestHelper.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/QuestHelper.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/WeatherHelper.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/hideout/IHideout.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/ProfileFixerService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/ProfileFixerService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/SeasonalEventService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/SeasonalEventService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/18CustomItemService/types/callbacks/DataCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/18CustomItemService/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/18CustomItemService/types/controllers/WeatherController.d.ts b/TypeScript/18CustomItemService/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/18CustomItemService/types/controllers/WeatherController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/18CustomItemService/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/18CustomItemService/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/18CustomItemService/types/helpers/WeatherHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/18CustomItemService/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/18CustomItemService/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/18CustomItemService/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/18CustomItemService/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/18CustomItemService/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/18CustomItemService/types/models/spt/hideout/IHideout.d.ts b/TypeScript/18CustomItemService/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/18CustomItemService/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts b/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts +++ b/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts b/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts +++ b/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/19UseExternalLibraries/types/callbacks/DataCallbacks.d.ts b/TypeScript/19UseExternalLibraries/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/19UseExternalLibraries/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/19UseExternalLibraries/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/19UseExternalLibraries/types/controllers/WeatherController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/WeatherController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/19UseExternalLibraries/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/19UseExternalLibraries/types/helpers/QuestHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/QuestHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/19UseExternalLibraries/types/helpers/WeatherHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/19UseExternalLibraries/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/hideout/IHideout.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts b/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/19UseExternalLibraries/types/services/SeasonalEventService.d.ts b/TypeScript/19UseExternalLibraries/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/19UseExternalLibraries/types/services/SeasonalEventService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/1LogToConsole/types/callbacks/DataCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/1LogToConsole/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/1LogToConsole/types/controllers/WeatherController.d.ts b/TypeScript/1LogToConsole/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/1LogToConsole/types/controllers/WeatherController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/1LogToConsole/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/1LogToConsole/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/1LogToConsole/types/helpers/WeatherHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/1LogToConsole/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/1LogToConsole/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/1LogToConsole/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/1LogToConsole/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/1LogToConsole/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/1LogToConsole/types/models/spt/hideout/IHideout.d.ts b/TypeScript/1LogToConsole/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/1LogToConsole/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts b/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts +++ b/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts b/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts +++ b/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/20CustomChatBot/types/callbacks/DataCallbacks.d.ts b/TypeScript/20CustomChatBot/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/20CustomChatBot/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/20CustomChatBot/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/20CustomChatBot/types/controllers/WeatherController.d.ts b/TypeScript/20CustomChatBot/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/20CustomChatBot/types/controllers/WeatherController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/20CustomChatBot/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/20CustomChatBot/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/20CustomChatBot/types/helpers/QuestHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/20CustomChatBot/types/helpers/QuestHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/20CustomChatBot/types/helpers/WeatherHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/20CustomChatBot/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/20CustomChatBot/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/20CustomChatBot/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/20CustomChatBot/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/20CustomChatBot/types/models/spt/hideout/IHideout.d.ts b/TypeScript/20CustomChatBot/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/20CustomChatBot/types/services/ProfileFixerService.d.ts b/TypeScript/20CustomChatBot/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/20CustomChatBot/types/services/ProfileFixerService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/20CustomChatBot/types/services/SeasonalEventService.d.ts b/TypeScript/20CustomChatBot/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/20CustomChatBot/types/services/SeasonalEventService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/21CustomCommandoCommand/types/callbacks/DataCallbacks.d.ts b/TypeScript/21CustomCommandoCommand/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/21CustomCommandoCommand/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/WeatherController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/WeatherController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/21CustomCommandoCommand/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/QuestHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/QuestHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/WeatherHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/hideout/IHideout.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/21CustomCommandoCommand/types/services/ProfileFixerService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/ProfileFixerService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/21CustomCommandoCommand/types/services/SeasonalEventService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/SeasonalEventService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/22CustomSptCommand/types/callbacks/DataCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/22CustomSptCommand/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/22CustomSptCommand/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/22CustomSptCommand/types/controllers/WeatherController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/22CustomSptCommand/types/controllers/WeatherController.d.ts +++ b/TypeScript/22CustomSptCommand/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/22CustomSptCommand/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/22CustomSptCommand/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/22CustomSptCommand/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/22CustomSptCommand/types/helpers/QuestHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/22CustomSptCommand/types/helpers/QuestHelper.d.ts +++ b/TypeScript/22CustomSptCommand/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/22CustomSptCommand/types/helpers/WeatherHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/22CustomSptCommand/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/22CustomSptCommand/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/22CustomSptCommand/types/models/spt/hideout/IHideout.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/22CustomSptCommand/types/services/ProfileFixerService.d.ts b/TypeScript/22CustomSptCommand/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/22CustomSptCommand/types/services/ProfileFixerService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/22CustomSptCommand/types/services/SeasonalEventService.d.ts b/TypeScript/22CustomSptCommand/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/22CustomSptCommand/types/services/SeasonalEventService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/DataCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/WeatherController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/WeatherController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/QuestHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/QuestHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/WeatherHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/hideout/IHideout.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/23CustomAbstractChatBot/types/services/ProfileFixerService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/ProfileFixerService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/23CustomAbstractChatBot/types/services/SeasonalEventService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/SeasonalEventService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/24WebSocket/types/callbacks/DataCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/24WebSocket/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/24WebSocket/types/controllers/WeatherController.d.ts b/TypeScript/24WebSocket/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/24WebSocket/types/controllers/WeatherController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/24WebSocket/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/24WebSocket/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/24WebSocket/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/24WebSocket/types/helpers/QuestHelper.d.ts b/TypeScript/24WebSocket/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/24WebSocket/types/helpers/QuestHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/24WebSocket/types/helpers/WeatherHelper.d.ts b/TypeScript/24WebSocket/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/24WebSocket/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/24WebSocket/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/24WebSocket/types/models/spt/hideout/IHideout.d.ts b/TypeScript/24WebSocket/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/24WebSocket/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/24WebSocket/types/services/ProfileFixerService.d.ts b/TypeScript/24WebSocket/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/24WebSocket/types/services/ProfileFixerService.d.ts +++ b/TypeScript/24WebSocket/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/24WebSocket/types/services/SeasonalEventService.d.ts b/TypeScript/24WebSocket/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/24WebSocket/types/services/SeasonalEventService.d.ts +++ b/TypeScript/24WebSocket/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/2EditDatabase/types/callbacks/DataCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/2EditDatabase/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/2EditDatabase/types/controllers/WeatherController.d.ts b/TypeScript/2EditDatabase/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/2EditDatabase/types/controllers/WeatherController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/2EditDatabase/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/2EditDatabase/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/2EditDatabase/types/helpers/WeatherHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/2EditDatabase/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/2EditDatabase/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/2EditDatabase/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/2EditDatabase/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/2EditDatabase/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/2EditDatabase/types/models/spt/hideout/IHideout.d.ts b/TypeScript/2EditDatabase/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/2EditDatabase/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts b/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts +++ b/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/2EditDatabase/types/services/SeasonalEventService.d.ts b/TypeScript/2EditDatabase/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/2EditDatabase/types/services/SeasonalEventService.d.ts +++ b/TypeScript/2EditDatabase/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/3GetSptConfigFile/types/callbacks/DataCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/3GetSptConfigFile/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/3GetSptConfigFile/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/3GetSptConfigFile/types/controllers/WeatherController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/WeatherController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/3GetSptConfigFile/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/3GetSptConfigFile/types/helpers/WeatherHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/3GetSptConfigFile/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/hideout/IHideout.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/3GetSptConfigFile/types/services/SeasonalEventService.d.ts b/TypeScript/3GetSptConfigFile/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/3GetSptConfigFile/types/services/SeasonalEventService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/DataCallbacks.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/WeatherController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/WeatherController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/QuestHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/QuestHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/WeatherHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/hideout/IHideout.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/SeasonalEventService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/SeasonalEventService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/DataCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/WeatherController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/WeatherController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/4UseACustomConfigFile/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/WeatherHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/hideout/IHideout.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/5ReplaceMethod/types/callbacks/DataCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/5ReplaceMethod/types/controllers/WeatherController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/WeatherController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/5ReplaceMethod/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/5ReplaceMethod/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/5ReplaceMethod/types/helpers/WeatherHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/5ReplaceMethod/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/5ReplaceMethod/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/hideout/IHideout.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts b/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts b/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/DataCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/WeatherController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/WeatherController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/WeatherHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/hideout/IHideout.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/7OnLoadHook/types/callbacks/DataCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/7OnLoadHook/types/controllers/WeatherController.d.ts b/TypeScript/7OnLoadHook/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/7OnLoadHook/types/controllers/WeatherController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/7OnLoadHook/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/7OnLoadHook/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/7OnLoadHook/types/helpers/WeatherHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/7OnLoadHook/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/7OnLoadHook/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/7OnLoadHook/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/7OnLoadHook/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/7OnLoadHook/types/models/spt/hideout/IHideout.d.ts b/TypeScript/7OnLoadHook/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts b/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts b/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/8OnUpdateHook/types/callbacks/DataCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/8OnUpdateHook/types/controllers/WeatherController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/WeatherController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/8OnUpdateHook/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/8OnUpdateHook/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/8OnUpdateHook/types/helpers/WeatherHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/8OnUpdateHook/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/8OnUpdateHook/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/hideout/IHideout.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts b/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts b/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps diff --git a/TypeScript/9RouterHooks/types/callbacks/DataCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/DataCallbacks.d.ts index d92be66..5b501e1 100644 --- a/TypeScript/9RouterHooks/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/DataCallbacks.d.ts @@ -8,7 +8,6 @@ import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; import { IGetItemPricesResponse } from "@spt/models/eft/game/IGetItemPricesResponse"; import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; @@ -63,7 +62,6 @@ export declare class DataCallbacks { getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/languages */ diff --git a/TypeScript/9RouterHooks/types/controllers/WeatherController.d.ts b/TypeScript/9RouterHooks/types/controllers/WeatherController.d.ts index 493cb8f..7cf71a6 100644 --- a/TypeScript/9RouterHooks/types/controllers/WeatherController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/WeatherController.d.ts @@ -18,11 +18,6 @@ export declare class WeatherController { constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; - /** - * Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK) - * @returns Date object - */ - getCurrentInRaidTime(): Date; /** Handle client/localGame/weather */ generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/9RouterHooks/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/ScavCaseRewardGenerator.d.ts index 28ec2b6..715b84e 100644 --- a/TypeScript/9RouterHooks/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/ScavCaseRewardGenerator.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; +import { IScavRecipe } from "@spt/models/eft/hideout/IHideoutProduction"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -84,10 +84,10 @@ export declare class ScavCaseRewardGenerator { protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object - * @param scavCaseDetails scavcase.json values + * @param scavCaseDetails production.json/scavRecipes object * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IScavRecipe): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts index ff0f72b..cfb1be4 100644 --- a/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts @@ -113,12 +113,12 @@ export declare class QuestHelper { */ protected generateArmorRewardChildSlots(originalRewardRootItem: IItem, questReward: IQuestReward): void; /** - * Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success) + * Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success) * @param quest quest to get rewards for * @param status Quest status that holds the items (Started, Success, Fail) * @returns array of items with the correct maxStack */ - getQuestRewardItems(quest: IQuest, status: QuestStatus): IItem[]; + getQuestRewardItems(quest: IQuest, status: QuestStatus, gameVersion: string): IItem[]; /** * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile * @param pmcData Player profile @@ -321,6 +321,15 @@ export declare class QuestHelper { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Create a clone of the given quest array with the rewards updated to reflect the + * given game version + * + * @param quests The list of quests to check + * @param gameVersion The game version of the profile + * @returns array of IQuest objects with the rewards filtered correctly for the game version + */ + protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[]; /** * Return a list of quests that would fail when supplied quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/9RouterHooks/types/helpers/WeatherHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/WeatherHelper.d.ts index 928017f..c82f42b 100644 --- a/TypeScript/9RouterHooks/types/helpers/WeatherHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/WeatherHelper.d.ts @@ -10,7 +10,7 @@ export declare class WeatherHelper { protected weatherConfig: IWeatherConfig; constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); /** - * Get the current in-raid time + * Get the current in-raid time - does not include an accurate date, only time * @param currentDate (new Date()) * @returns Date object of current in-raid time */ diff --git a/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutScavCase.d.ts deleted file mode 100644 index b420d2d..0000000 --- a/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutScavCase.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: IRequirement[]; - EndProducts: IEndProducts; -} -export interface IRequirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; -} -export interface IEndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; -} diff --git a/TypeScript/9RouterHooks/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/9RouterHooks/types/models/spt/callbacks/IDataCallbacks.d.ts deleted file mode 100644 index cd0adab..0000000 --- a/TypeScript/9RouterHooks/types/models/spt/callbacks/IDataCallbacks.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; -import { IGlobals } from "@spt/models/eft/common/IGlobals"; -import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; -import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; -import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; -import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; -export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; -} diff --git a/TypeScript/9RouterHooks/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/ICoreConfig.d.ts index d35cc7d..aedba0c 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/ICoreConfig.d.ts @@ -57,6 +57,8 @@ export interface IGameFixes { fixShotgunDispersion: boolean; /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ removeModItemsFromProfile: boolean; + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + removeInvalidTradersFromProfile: boolean; /** Fix issues that cause the game to not start due to inventory item issues */ fixProfileBreakingInventoryItemIssues: boolean; } diff --git a/TypeScript/9RouterHooks/types/models/spt/hideout/IHideout.d.ts b/TypeScript/9RouterHooks/types/models/spt/hideout/IHideout.d.ts index e93f748..40f2d9b 100644 --- a/TypeScript/9RouterHooks/types/models/spt/hideout/IHideout.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/hideout/IHideout.d.ts @@ -1,12 +1,10 @@ import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutProductionData } from "@spt/models/eft/hideout/IHideoutProduction"; -import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IQteData } from "@spt/models/eft/hideout/IQteData"; export interface IHideout { areas: IHideoutArea[]; production: IHideoutProductionData; - scavcase: IHideoutScavCase[]; settings: IHideoutSettingsBase; qte: IQteData[]; } diff --git a/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts b/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts index 43d1d11..6ffda1b 100644 --- a/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts +++ b/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts @@ -120,4 +120,5 @@ export declare class ProfileFixerService { * @returns matching bonus */ protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; + checkForAndRemoveInvalidTraders(fullProfile: ISptProfile): void; } diff --git a/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts b/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts index 7ce39dc..d239ee9 100644 --- a/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts +++ b/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts @@ -138,6 +138,12 @@ export declare class SeasonalEventService { */ protected enableHalloweenSummonEvent(): void; protected configureZombies(zombieSettings: IZombieSettings): void; + /** + * BSG store the location ids differently inside `LocationInfection`, need to convert to matching location IDs + * @param infectedLocationKey Key to convert + * @returns Array of locations + */ + protected getLocationFromInfectedLocation(infectedLocationKey: string): string[]; protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps