diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/HealthCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/InraidCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/MatchCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/10ScopesAndTypes/types/context/ContextVariableType.d.ts b/TypeScript/10ScopesAndTypes/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/10ScopesAndTypes/types/context/ContextVariableType.d.ts +++ b/TypeScript/10ScopesAndTypes/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/HealthController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/HealthController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/10ScopesAndTypes/types/controllers/InventoryController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/InventoryController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/QuestController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/QuestController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/10ScopesAndTypes/types/di/Serializer.d.ts b/TypeScript/10ScopesAndTypes/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/10ScopesAndTypes/types/di/Serializer.d.ts +++ b/TypeScript/10ScopesAndTypes/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotLootGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/10ScopesAndTypes/types/generators/LocationLootGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/10ScopesAndTypes/types/generators/WeatherGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/TraderHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/TraderHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/IGlobals.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/ILocationBase.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IItem.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/ExitStatis.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/10ScopesAndTypes/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/ItemEventActions.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/10ScopesAndTypes/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/Season.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/10ScopesAndTypes/types/models/enums/Season.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/SeasonalEventType.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/10ScopesAndTypes/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/10ScopesAndTypes/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IBotConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IItemConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/10ScopesAndTypes/types/routers/ImageRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/ImageRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/10ScopesAndTypes/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/10ScopesAndTypes/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/10ScopesAndTypes/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/10ScopesAndTypes/types/servers/http/SptHttpListener.d.ts b/TypeScript/10ScopesAndTypes/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/10ScopesAndTypes/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/10ScopesAndTypes/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts b/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/10ScopesAndTypes/types/services/LocationLifecycleService.d.ts b/TypeScript/10ScopesAndTypes/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/10ScopesAndTypes/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/10ScopesAndTypes/types/services/PaymentService.d.ts b/TypeScript/10ScopesAndTypes/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/10ScopesAndTypes/types/services/PaymentService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/10ScopesAndTypes/types/services/PmcChatResponseService.d.ts b/TypeScript/10ScopesAndTypes/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/10ScopesAndTypes/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/10ScopesAndTypes/types/services/PostDbLoadService.d.ts b/TypeScript/10ScopesAndTypes/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts b/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/10ScopesAndTypes/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/10ScopesAndTypes/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/10ScopesAndTypes/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/10ScopesAndTypes/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/10ScopesAndTypes/types/utils/HttpFileUtil.d.ts b/TypeScript/10ScopesAndTypes/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/HealthCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/InraidCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/MatchCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/11BundleLoadingSample/types/context/ContextVariableType.d.ts b/TypeScript/11BundleLoadingSample/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/11BundleLoadingSample/types/context/ContextVariableType.d.ts +++ b/TypeScript/11BundleLoadingSample/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/HealthController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/HealthController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/11BundleLoadingSample/types/controllers/InventoryController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/InventoryController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/QuestController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/QuestController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/11BundleLoadingSample/types/di/Serializer.d.ts b/TypeScript/11BundleLoadingSample/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/11BundleLoadingSample/types/di/Serializer.d.ts +++ b/TypeScript/11BundleLoadingSample/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotLootGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/11BundleLoadingSample/types/generators/LocationLootGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/11BundleLoadingSample/types/generators/WeatherGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/TraderHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/TraderHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/IGlobals.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/ILocationBase.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IItem.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/ExitStatis.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/11BundleLoadingSample/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/ItemEventActions.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/11BundleLoadingSample/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/Season.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/11BundleLoadingSample/types/models/enums/Season.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/SeasonalEventType.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/11BundleLoadingSample/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/11BundleLoadingSample/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IBotConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IItemConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/11BundleLoadingSample/types/routers/ImageRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/ImageRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/11BundleLoadingSample/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/11BundleLoadingSample/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/11BundleLoadingSample/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/11BundleLoadingSample/types/servers/http/SptHttpListener.d.ts b/TypeScript/11BundleLoadingSample/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/11BundleLoadingSample/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/11BundleLoadingSample/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts b/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/11BundleLoadingSample/types/services/LocationLifecycleService.d.ts b/TypeScript/11BundleLoadingSample/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/11BundleLoadingSample/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/11BundleLoadingSample/types/services/PaymentService.d.ts b/TypeScript/11BundleLoadingSample/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/11BundleLoadingSample/types/services/PaymentService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/11BundleLoadingSample/types/services/PmcChatResponseService.d.ts b/TypeScript/11BundleLoadingSample/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/11BundleLoadingSample/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/11BundleLoadingSample/types/services/PostDbLoadService.d.ts b/TypeScript/11BundleLoadingSample/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts b/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/11BundleLoadingSample/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/11BundleLoadingSample/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/11BundleLoadingSample/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/11BundleLoadingSample/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/11BundleLoadingSample/types/utils/HttpFileUtil.d.ts b/TypeScript/11BundleLoadingSample/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/HealthCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/InraidCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/MatchCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/12ClassExtensionOverride/types/context/ContextVariableType.d.ts b/TypeScript/12ClassExtensionOverride/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/12ClassExtensionOverride/types/context/ContextVariableType.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/HealthController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/HealthController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/InventoryController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/InventoryController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/QuestController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/QuestController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/12ClassExtensionOverride/types/di/Serializer.d.ts b/TypeScript/12ClassExtensionOverride/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/12ClassExtensionOverride/types/di/Serializer.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotLootGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/12ClassExtensionOverride/types/generators/LocationLootGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/12ClassExtensionOverride/types/generators/WeatherGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/TraderHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/TraderHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/IGlobals.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILocationBase.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IItem.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/ExitStatis.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/ItemEventActions.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/Season.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/enums/Season.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/SeasonalEventType.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBotConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IItemConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/12ClassExtensionOverride/types/routers/ImageRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/ImageRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/12ClassExtensionOverride/types/servers/http/SptHttpListener.d.ts b/TypeScript/12ClassExtensionOverride/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/12ClassExtensionOverride/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/12ClassExtensionOverride/types/services/LocationLifecycleService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/12ClassExtensionOverride/types/services/PaymentService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/PaymentService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/12ClassExtensionOverride/types/services/PmcChatResponseService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/12ClassExtensionOverride/types/services/PostDbLoadService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/12ClassExtensionOverride/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/12ClassExtensionOverride/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/12ClassExtensionOverride/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/12ClassExtensionOverride/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/12ClassExtensionOverride/types/utils/HttpFileUtil.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/HealthCallbacks.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/InraidCallbacks.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/MatchCallbacks.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/context/ContextVariableType.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/context/ContextVariableType.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/GameController.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/GameController.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/HealthController.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/HealthController.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/InraidController.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/InraidController.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/InsuranceController.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/InsuranceController.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/InventoryController.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/InventoryController.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/QuestController.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/QuestController.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/di/Serializer.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/di/Serializer.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotGenerator.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotGenerator.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotLootGenerator.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/LocationLootGenerator.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/WeatherGenerator.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/InRaidHelper.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/ItemHelper.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/ItemHelper.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/QuestHelper.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/QuestHelper.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/TraderHelper.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/TraderHelper.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/IGlobals.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/ILocationBase.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/IItem.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/ExitStatis.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/ItemEventActions.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/Season.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/Season.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/SeasonalEventType.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IBotConfig.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ 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 39c4f18..572d0b4 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IItemConfig.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/routers/ImageRouter.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/routers/ImageRouter.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/servers/http/SptHttpListener.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/InsuranceService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/InsuranceService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/LocationLifecycleService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/PaymentService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/PaymentService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/PmcChatResponseService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/PostDbLoadService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/SeasonalEventService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/SeasonalEventService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/utils/HttpFileUtil.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/13AddTrader/types/callbacks/HealthCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/13AddTrader/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/13AddTrader/types/callbacks/InraidCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/13AddTrader/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/13AddTrader/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/13AddTrader/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/13AddTrader/types/callbacks/MatchCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/13AddTrader/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/13AddTrader/types/context/ContextVariableType.d.ts b/TypeScript/13AddTrader/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/13AddTrader/types/context/ContextVariableType.d.ts +++ b/TypeScript/13AddTrader/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/13AddTrader/types/controllers/GameController.d.ts b/TypeScript/13AddTrader/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/13AddTrader/types/controllers/GameController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/13AddTrader/types/controllers/HealthController.d.ts b/TypeScript/13AddTrader/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/13AddTrader/types/controllers/HealthController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/13AddTrader/types/controllers/InraidController.d.ts b/TypeScript/13AddTrader/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/13AddTrader/types/controllers/InraidController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/13AddTrader/types/controllers/InsuranceController.d.ts b/TypeScript/13AddTrader/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/13AddTrader/types/controllers/InsuranceController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/13AddTrader/types/controllers/InventoryController.d.ts b/TypeScript/13AddTrader/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/13AddTrader/types/controllers/InventoryController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/13AddTrader/types/controllers/QuestController.d.ts b/TypeScript/13AddTrader/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/13AddTrader/types/controllers/QuestController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/13AddTrader/types/di/Serializer.d.ts b/TypeScript/13AddTrader/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/13AddTrader/types/di/Serializer.d.ts +++ b/TypeScript/13AddTrader/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/13AddTrader/types/generators/BotGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/13AddTrader/types/generators/BotGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/13AddTrader/types/generators/BotLootGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/13AddTrader/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/13AddTrader/types/generators/LocationLootGenerator.d.ts b/TypeScript/13AddTrader/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/13AddTrader/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/13AddTrader/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/13AddTrader/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/13AddTrader/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/13AddTrader/types/generators/WeatherGenerator.d.ts b/TypeScript/13AddTrader/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/13AddTrader/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/13AddTrader/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/13AddTrader/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/13AddTrader/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/13AddTrader/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts b/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts b/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts b/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/13AddTrader/types/helpers/TraderHelper.d.ts b/TypeScript/13AddTrader/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/13AddTrader/types/helpers/TraderHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/13AddTrader/types/models/eft/common/IGlobals.d.ts b/TypeScript/13AddTrader/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/13AddTrader/types/models/eft/common/ILocationBase.d.ts b/TypeScript/13AddTrader/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/13AddTrader/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/13AddTrader/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/13AddTrader/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/13AddTrader/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/13AddTrader/types/models/eft/common/tables/IItem.d.ts b/TypeScript/13AddTrader/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/13AddTrader/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/13AddTrader/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/13AddTrader/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/13AddTrader/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/13AddTrader/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/13AddTrader/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/13AddTrader/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/13AddTrader/types/models/enums/ExitStatis.d.ts b/TypeScript/13AddTrader/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/13AddTrader/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/13AddTrader/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/13AddTrader/types/models/enums/ItemEventActions.d.ts b/TypeScript/13AddTrader/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/13AddTrader/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/13AddTrader/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/13AddTrader/types/models/enums/Season.d.ts b/TypeScript/13AddTrader/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/13AddTrader/types/models/enums/Season.d.ts +++ b/TypeScript/13AddTrader/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/13AddTrader/types/models/enums/SeasonalEventType.d.ts b/TypeScript/13AddTrader/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/13AddTrader/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/13AddTrader/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/13AddTrader/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/13AddTrader/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/13AddTrader/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/13AddTrader/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/13AddTrader/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/13AddTrader/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/13AddTrader/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/13AddTrader/types/models/spt/config/IBotConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/13AddTrader/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/13AddTrader/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/13AddTrader/types/models/spt/config/IItemConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/13AddTrader/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/13AddTrader/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/13AddTrader/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/13AddTrader/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/13AddTrader/types/routers/ImageRouter.d.ts b/TypeScript/13AddTrader/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/13AddTrader/types/routers/ImageRouter.d.ts +++ b/TypeScript/13AddTrader/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/13AddTrader/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/13AddTrader/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/13AddTrader/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/13AddTrader/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/13AddTrader/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/13AddTrader/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/13AddTrader/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/13AddTrader/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/13AddTrader/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/13AddTrader/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/13AddTrader/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/13AddTrader/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/13AddTrader/types/servers/http/SptHttpListener.d.ts b/TypeScript/13AddTrader/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/13AddTrader/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/13AddTrader/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/13AddTrader/types/services/InsuranceService.d.ts b/TypeScript/13AddTrader/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/13AddTrader/types/services/InsuranceService.d.ts +++ b/TypeScript/13AddTrader/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/13AddTrader/types/services/LocationLifecycleService.d.ts b/TypeScript/13AddTrader/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/13AddTrader/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/13AddTrader/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/13AddTrader/types/services/PaymentService.d.ts b/TypeScript/13AddTrader/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/13AddTrader/types/services/PaymentService.d.ts +++ b/TypeScript/13AddTrader/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/13AddTrader/types/services/PmcChatResponseService.d.ts b/TypeScript/13AddTrader/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/13AddTrader/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/13AddTrader/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/13AddTrader/types/services/PostDbLoadService.d.ts b/TypeScript/13AddTrader/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/13AddTrader/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts b/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts +++ b/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/13AddTrader/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/13AddTrader/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/13AddTrader/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/13AddTrader/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/13AddTrader/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/13AddTrader/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/13AddTrader/types/utils/HttpFileUtil.d.ts b/TypeScript/13AddTrader/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/13AddTrader/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/13AddTrader/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/HealthCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/InraidCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/MatchCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/14AfterDBLoadHook/types/context/ContextVariableType.d.ts b/TypeScript/14AfterDBLoadHook/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/14AfterDBLoadHook/types/context/ContextVariableType.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/HealthController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/HealthController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/InraidController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/InraidController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/InventoryController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/InventoryController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/QuestController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/QuestController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/14AfterDBLoadHook/types/di/Serializer.d.ts b/TypeScript/14AfterDBLoadHook/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/14AfterDBLoadHook/types/di/Serializer.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotLootGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/14AfterDBLoadHook/types/generators/LocationLootGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/14AfterDBLoadHook/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/14AfterDBLoadHook/types/generators/WeatherGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/TraderHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/TraderHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/IGlobals.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILocationBase.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IItem.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/ExitStatis.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/ItemEventActions.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/Season.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/enums/Season.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/SeasonalEventType.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBotConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IItemConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/14AfterDBLoadHook/types/routers/ImageRouter.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/ImageRouter.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/14AfterDBLoadHook/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/14AfterDBLoadHook/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/14AfterDBLoadHook/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/14AfterDBLoadHook/types/servers/http/SptHttpListener.d.ts b/TypeScript/14AfterDBLoadHook/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/14AfterDBLoadHook/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/14AfterDBLoadHook/types/services/InsuranceService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/InsuranceService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/14AfterDBLoadHook/types/services/LocationLifecycleService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/14AfterDBLoadHook/types/services/PaymentService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/PaymentService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/14AfterDBLoadHook/types/services/PmcChatResponseService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/14AfterDBLoadHook/types/services/PostDbLoadService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/14AfterDBLoadHook/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/14AfterDBLoadHook/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/14AfterDBLoadHook/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/14AfterDBLoadHook/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/14AfterDBLoadHook/types/utils/HttpFileUtil.d.ts b/TypeScript/14AfterDBLoadHook/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/14AfterDBLoadHook/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/15HttpListenerExample/types/callbacks/HealthCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/15HttpListenerExample/types/callbacks/InraidCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/15HttpListenerExample/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/15HttpListenerExample/types/callbacks/MatchCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/15HttpListenerExample/types/context/ContextVariableType.d.ts b/TypeScript/15HttpListenerExample/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/15HttpListenerExample/types/context/ContextVariableType.d.ts +++ b/TypeScript/15HttpListenerExample/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/15HttpListenerExample/types/controllers/HealthController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/HealthController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/15HttpListenerExample/types/controllers/InraidController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/InraidController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/15HttpListenerExample/types/controllers/InventoryController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/InventoryController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/15HttpListenerExample/types/controllers/QuestController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/QuestController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/15HttpListenerExample/types/di/Serializer.d.ts b/TypeScript/15HttpListenerExample/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/15HttpListenerExample/types/di/Serializer.d.ts +++ b/TypeScript/15HttpListenerExample/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/15HttpListenerExample/types/generators/BotGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/15HttpListenerExample/types/generators/BotLootGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/15HttpListenerExample/types/generators/LocationLootGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/15HttpListenerExample/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/15HttpListenerExample/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/15HttpListenerExample/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/15HttpListenerExample/types/generators/WeatherGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/15HttpListenerExample/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/15HttpListenerExample/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/15HttpListenerExample/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/15HttpListenerExample/types/helpers/TraderHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/TraderHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/IGlobals.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/ILocationBase.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IItem.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/15HttpListenerExample/types/models/enums/ExitStatis.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/15HttpListenerExample/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/15HttpListenerExample/types/models/enums/ItemEventActions.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/15HttpListenerExample/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/15HttpListenerExample/types/models/enums/Season.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/15HttpListenerExample/types/models/enums/Season.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/15HttpListenerExample/types/models/enums/SeasonalEventType.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/15HttpListenerExample/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/15HttpListenerExample/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/15HttpListenerExample/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IBotConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IItemConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/15HttpListenerExample/types/routers/ImageRouter.d.ts b/TypeScript/15HttpListenerExample/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/15HttpListenerExample/types/routers/ImageRouter.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/15HttpListenerExample/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/15HttpListenerExample/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/15HttpListenerExample/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/15HttpListenerExample/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/15HttpListenerExample/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/15HttpListenerExample/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/15HttpListenerExample/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/15HttpListenerExample/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/15HttpListenerExample/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/15HttpListenerExample/types/servers/http/SptHttpListener.d.ts b/TypeScript/15HttpListenerExample/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/15HttpListenerExample/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/15HttpListenerExample/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/15HttpListenerExample/types/services/InsuranceService.d.ts b/TypeScript/15HttpListenerExample/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/15HttpListenerExample/types/services/InsuranceService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/15HttpListenerExample/types/services/LocationLifecycleService.d.ts b/TypeScript/15HttpListenerExample/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/15HttpListenerExample/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/15HttpListenerExample/types/services/PaymentService.d.ts b/TypeScript/15HttpListenerExample/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/15HttpListenerExample/types/services/PaymentService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/15HttpListenerExample/types/services/PmcChatResponseService.d.ts b/TypeScript/15HttpListenerExample/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/15HttpListenerExample/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/15HttpListenerExample/types/services/PostDbLoadService.d.ts b/TypeScript/15HttpListenerExample/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts b/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/15HttpListenerExample/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/15HttpListenerExample/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/15HttpListenerExample/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/15HttpListenerExample/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/15HttpListenerExample/types/utils/HttpFileUtil.d.ts b/TypeScript/15HttpListenerExample/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/15HttpListenerExample/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/15HttpListenerExample/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/16ImporterUtil/types/callbacks/HealthCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/16ImporterUtil/types/callbacks/InraidCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/16ImporterUtil/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/16ImporterUtil/types/callbacks/MatchCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/16ImporterUtil/types/context/ContextVariableType.d.ts b/TypeScript/16ImporterUtil/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/16ImporterUtil/types/context/ContextVariableType.d.ts +++ b/TypeScript/16ImporterUtil/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts b/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/16ImporterUtil/types/controllers/HealthController.d.ts b/TypeScript/16ImporterUtil/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/16ImporterUtil/types/controllers/HealthController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/16ImporterUtil/types/controllers/InraidController.d.ts b/TypeScript/16ImporterUtil/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/16ImporterUtil/types/controllers/InraidController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts b/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/16ImporterUtil/types/controllers/InventoryController.d.ts b/TypeScript/16ImporterUtil/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/16ImporterUtil/types/controllers/InventoryController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/16ImporterUtil/types/controllers/QuestController.d.ts b/TypeScript/16ImporterUtil/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/16ImporterUtil/types/controllers/QuestController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/16ImporterUtil/types/di/Serializer.d.ts b/TypeScript/16ImporterUtil/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/16ImporterUtil/types/di/Serializer.d.ts +++ b/TypeScript/16ImporterUtil/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/16ImporterUtil/types/generators/BotGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/16ImporterUtil/types/generators/BotLootGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/16ImporterUtil/types/generators/LocationLootGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/16ImporterUtil/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/16ImporterUtil/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/16ImporterUtil/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/16ImporterUtil/types/generators/WeatherGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/16ImporterUtil/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/16ImporterUtil/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/16ImporterUtil/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/16ImporterUtil/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/16ImporterUtil/types/helpers/TraderHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/16ImporterUtil/types/helpers/TraderHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/IGlobals.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/ILocationBase.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IItem.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/16ImporterUtil/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/16ImporterUtil/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/16ImporterUtil/types/models/enums/ExitStatis.d.ts b/TypeScript/16ImporterUtil/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/16ImporterUtil/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/16ImporterUtil/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/16ImporterUtil/types/models/enums/ItemEventActions.d.ts b/TypeScript/16ImporterUtil/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/16ImporterUtil/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/16ImporterUtil/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/16ImporterUtil/types/models/enums/Season.d.ts b/TypeScript/16ImporterUtil/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/16ImporterUtil/types/models/enums/Season.d.ts +++ b/TypeScript/16ImporterUtil/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/16ImporterUtil/types/models/enums/SeasonalEventType.d.ts b/TypeScript/16ImporterUtil/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/16ImporterUtil/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/16ImporterUtil/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/16ImporterUtil/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/16ImporterUtil/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/16ImporterUtil/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/16ImporterUtil/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/16ImporterUtil/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/16ImporterUtil/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IBotConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IItemConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/16ImporterUtil/types/routers/ImageRouter.d.ts b/TypeScript/16ImporterUtil/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/16ImporterUtil/types/routers/ImageRouter.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/16ImporterUtil/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/16ImporterUtil/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/16ImporterUtil/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/16ImporterUtil/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/16ImporterUtil/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/16ImporterUtil/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/16ImporterUtil/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/16ImporterUtil/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/16ImporterUtil/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/16ImporterUtil/types/servers/http/SptHttpListener.d.ts b/TypeScript/16ImporterUtil/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/16ImporterUtil/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/16ImporterUtil/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/16ImporterUtil/types/services/InsuranceService.d.ts b/TypeScript/16ImporterUtil/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/16ImporterUtil/types/services/InsuranceService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/16ImporterUtil/types/services/LocationLifecycleService.d.ts b/TypeScript/16ImporterUtil/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/16ImporterUtil/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/16ImporterUtil/types/services/PaymentService.d.ts b/TypeScript/16ImporterUtil/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/16ImporterUtil/types/services/PaymentService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/16ImporterUtil/types/services/PmcChatResponseService.d.ts b/TypeScript/16ImporterUtil/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/16ImporterUtil/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/16ImporterUtil/types/services/PostDbLoadService.d.ts b/TypeScript/16ImporterUtil/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/16ImporterUtil/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts b/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/16ImporterUtil/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/16ImporterUtil/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/16ImporterUtil/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/16ImporterUtil/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/16ImporterUtil/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/16ImporterUtil/types/utils/HttpFileUtil.d.ts b/TypeScript/16ImporterUtil/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/16ImporterUtil/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/16ImporterUtil/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/HealthCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/InraidCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/MatchCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/17AsyncImporterWithDependency1/types/context/ContextVariableType.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/context/ContextVariableType.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/HealthController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/HealthController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InraidController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InraidController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InventoryController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InventoryController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/QuestController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/QuestController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/17AsyncImporterWithDependency1/types/di/Serializer.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/di/Serializer.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLootGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/LocationLootGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/WeatherGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/TraderHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/TraderHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/IGlobals.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILocationBase.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IItem.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ExitStatis.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ItemEventActions.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/Season.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/Season.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/SeasonalEventType.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBotConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IItemConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/ImageRouter.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/ImageRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/servers/http/SptHttpListener.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/InsuranceService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/InsuranceService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/LocationLifecycleService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/PaymentService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/PaymentService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/PmcChatResponseService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/PostDbLoadService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/17AsyncImporterWithDependency1/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/utils/HttpFileUtil.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/HealthCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/InraidCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/MatchCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/17AsyncImporterWithDependency2/types/context/ContextVariableType.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/context/ContextVariableType.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/HealthController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/HealthController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InraidController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InraidController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InventoryController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InventoryController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/QuestController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/QuestController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/17AsyncImporterWithDependency2/types/di/Serializer.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/di/Serializer.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLootGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/LocationLootGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/WeatherGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/TraderHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/TraderHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/IGlobals.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILocationBase.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IItem.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ExitStatis.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ItemEventActions.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/Season.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/Season.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/SeasonalEventType.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBotConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IItemConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/ImageRouter.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/ImageRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/servers/http/SptHttpListener.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/InsuranceService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/InsuranceService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/LocationLifecycleService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/PaymentService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/PaymentService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/PmcChatResponseService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/PostDbLoadService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/17AsyncImporterWithDependency2/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/utils/HttpFileUtil.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/HealthCallbacks.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/InraidCallbacks.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/MatchCallbacks.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/context/ContextVariableType.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/context/ContextVariableType.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/GameController.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/GameController.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/HealthController.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/HealthController.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/InraidController.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/InraidController.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/InsuranceController.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/InsuranceController.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/InventoryController.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/InventoryController.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/QuestController.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/QuestController.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/di/Serializer.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/di/Serializer.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotGenerator.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotGenerator.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotLootGenerator.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/generators/LocationLootGenerator.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/generators/WeatherGenerator.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/InRaidHelper.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/ItemHelper.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/ItemHelper.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/QuestHelper.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/QuestHelper.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/TraderHelper.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/TraderHelper.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/IGlobals.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/ILocationBase.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/IItem.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/ExitStatis.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/ItemEventActions.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/Season.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/Season.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/SeasonalEventType.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IBotConfig.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ 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 39c4f18..572d0b4 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IItemConfig.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/routers/ImageRouter.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/routers/ImageRouter.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/servers/http/SptHttpListener.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/InsuranceService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/InsuranceService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/LocationLifecycleService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/PaymentService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/PaymentService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/PmcChatResponseService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/PostDbLoadService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/SeasonalEventService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/SeasonalEventService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/18.1CustomItemServiceLootBox/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/18.1CustomItemServiceLootBox/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/utils/HttpFileUtil.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/18CustomItemService/types/callbacks/HealthCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/18CustomItemService/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/18CustomItemService/types/callbacks/InraidCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/18CustomItemService/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/18CustomItemService/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/18CustomItemService/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/18CustomItemService/types/callbacks/MatchCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/18CustomItemService/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/18CustomItemService/types/context/ContextVariableType.d.ts b/TypeScript/18CustomItemService/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/18CustomItemService/types/context/ContextVariableType.d.ts +++ b/TypeScript/18CustomItemService/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/18CustomItemService/types/controllers/GameController.d.ts b/TypeScript/18CustomItemService/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/18CustomItemService/types/controllers/GameController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/18CustomItemService/types/controllers/HealthController.d.ts b/TypeScript/18CustomItemService/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/18CustomItemService/types/controllers/HealthController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/18CustomItemService/types/controllers/InraidController.d.ts b/TypeScript/18CustomItemService/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/18CustomItemService/types/controllers/InraidController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts b/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/18CustomItemService/types/controllers/InventoryController.d.ts b/TypeScript/18CustomItemService/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/18CustomItemService/types/controllers/InventoryController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/18CustomItemService/types/controllers/QuestController.d.ts b/TypeScript/18CustomItemService/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/18CustomItemService/types/controllers/QuestController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/18CustomItemService/types/di/Serializer.d.ts b/TypeScript/18CustomItemService/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/18CustomItemService/types/di/Serializer.d.ts +++ b/TypeScript/18CustomItemService/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/18CustomItemService/types/generators/BotGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/18CustomItemService/types/generators/BotGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/18CustomItemService/types/generators/BotLootGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/18CustomItemService/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/18CustomItemService/types/generators/LocationLootGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/18CustomItemService/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/18CustomItemService/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/18CustomItemService/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/18CustomItemService/types/generators/WeatherGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/18CustomItemService/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/18CustomItemService/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/18CustomItemService/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/18CustomItemService/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/18CustomItemService/types/helpers/InRaidHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/18CustomItemService/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/18CustomItemService/types/helpers/ItemHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/18CustomItemService/types/helpers/ItemHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/18CustomItemService/types/helpers/TraderHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/18CustomItemService/types/helpers/TraderHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/18CustomItemService/types/models/eft/common/IGlobals.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/18CustomItemService/types/models/eft/common/ILocationBase.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/18CustomItemService/types/models/eft/common/tables/IItem.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/18CustomItemService/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/18CustomItemService/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/18CustomItemService/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/18CustomItemService/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/18CustomItemService/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/18CustomItemService/types/models/enums/ExitStatis.d.ts b/TypeScript/18CustomItemService/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/18CustomItemService/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/18CustomItemService/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/18CustomItemService/types/models/enums/ItemEventActions.d.ts b/TypeScript/18CustomItemService/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/18CustomItemService/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/18CustomItemService/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/18CustomItemService/types/models/enums/Season.d.ts b/TypeScript/18CustomItemService/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/18CustomItemService/types/models/enums/Season.d.ts +++ b/TypeScript/18CustomItemService/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/18CustomItemService/types/models/enums/SeasonalEventType.d.ts b/TypeScript/18CustomItemService/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/18CustomItemService/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/18CustomItemService/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/18CustomItemService/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/18CustomItemService/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/18CustomItemService/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/18CustomItemService/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/18CustomItemService/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/18CustomItemService/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/18CustomItemService/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IBotConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/18CustomItemService/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IItemConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/18CustomItemService/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/18CustomItemService/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/18CustomItemService/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/18CustomItemService/types/routers/ImageRouter.d.ts b/TypeScript/18CustomItemService/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/18CustomItemService/types/routers/ImageRouter.d.ts +++ b/TypeScript/18CustomItemService/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/18CustomItemService/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/18CustomItemService/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/18CustomItemService/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/18CustomItemService/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/18CustomItemService/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/18CustomItemService/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/18CustomItemService/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/18CustomItemService/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/18CustomItemService/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/18CustomItemService/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/18CustomItemService/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/18CustomItemService/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/18CustomItemService/types/servers/http/SptHttpListener.d.ts b/TypeScript/18CustomItemService/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/18CustomItemService/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/18CustomItemService/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/18CustomItemService/types/services/InsuranceService.d.ts b/TypeScript/18CustomItemService/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/18CustomItemService/types/services/InsuranceService.d.ts +++ b/TypeScript/18CustomItemService/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/18CustomItemService/types/services/LocationLifecycleService.d.ts b/TypeScript/18CustomItemService/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/18CustomItemService/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/18CustomItemService/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/18CustomItemService/types/services/PaymentService.d.ts b/TypeScript/18CustomItemService/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/18CustomItemService/types/services/PaymentService.d.ts +++ b/TypeScript/18CustomItemService/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/18CustomItemService/types/services/PmcChatResponseService.d.ts b/TypeScript/18CustomItemService/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/18CustomItemService/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/18CustomItemService/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/18CustomItemService/types/services/PostDbLoadService.d.ts b/TypeScript/18CustomItemService/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/18CustomItemService/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts b/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts +++ b/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/18CustomItemService/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/18CustomItemService/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/18CustomItemService/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/18CustomItemService/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/18CustomItemService/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/18CustomItemService/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/18CustomItemService/types/utils/HttpFileUtil.d.ts b/TypeScript/18CustomItemService/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/18CustomItemService/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/18CustomItemService/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/19UseExternalLibraries/types/callbacks/HealthCallbacks.d.ts b/TypeScript/19UseExternalLibraries/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/19UseExternalLibraries/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/19UseExternalLibraries/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/19UseExternalLibraries/types/callbacks/InraidCallbacks.d.ts b/TypeScript/19UseExternalLibraries/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/19UseExternalLibraries/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/19UseExternalLibraries/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/19UseExternalLibraries/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/19UseExternalLibraries/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/19UseExternalLibraries/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/19UseExternalLibraries/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/19UseExternalLibraries/types/callbacks/MatchCallbacks.d.ts b/TypeScript/19UseExternalLibraries/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/19UseExternalLibraries/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/19UseExternalLibraries/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/19UseExternalLibraries/types/context/ContextVariableType.d.ts b/TypeScript/19UseExternalLibraries/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/19UseExternalLibraries/types/context/ContextVariableType.d.ts +++ b/TypeScript/19UseExternalLibraries/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/19UseExternalLibraries/types/controllers/GameController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/GameController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/19UseExternalLibraries/types/controllers/HealthController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/HealthController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/19UseExternalLibraries/types/controllers/InraidController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/InraidController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/19UseExternalLibraries/types/controllers/InsuranceController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/InsuranceController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/19UseExternalLibraries/types/controllers/InventoryController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/InventoryController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/19UseExternalLibraries/types/controllers/QuestController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/QuestController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/19UseExternalLibraries/types/di/Serializer.d.ts b/TypeScript/19UseExternalLibraries/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/19UseExternalLibraries/types/di/Serializer.d.ts +++ b/TypeScript/19UseExternalLibraries/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/19UseExternalLibraries/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/19UseExternalLibraries/types/generators/BotGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/BotGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/19UseExternalLibraries/types/generators/BotLootGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/19UseExternalLibraries/types/generators/LocationLootGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/19UseExternalLibraries/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/19UseExternalLibraries/types/generators/WeatherGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/19UseExternalLibraries/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/19UseExternalLibraries/types/helpers/InRaidHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/19UseExternalLibraries/types/helpers/ItemHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/ItemHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/19UseExternalLibraries/types/helpers/QuestHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/QuestHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/19UseExternalLibraries/types/helpers/TraderHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/TraderHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/common/IGlobals.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/common/ILocationBase.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IItem.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/ExitStatis.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/19UseExternalLibraries/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/ItemEventActions.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/19UseExternalLibraries/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/Season.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/19UseExternalLibraries/types/models/enums/Season.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/SeasonalEventType.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/19UseExternalLibraries/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/19UseExternalLibraries/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IBotConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IItemConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/19UseExternalLibraries/types/routers/ImageRouter.d.ts b/TypeScript/19UseExternalLibraries/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/ImageRouter.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/19UseExternalLibraries/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/19UseExternalLibraries/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/19UseExternalLibraries/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/19UseExternalLibraries/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/19UseExternalLibraries/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/19UseExternalLibraries/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/19UseExternalLibraries/types/servers/http/SptHttpListener.d.ts b/TypeScript/19UseExternalLibraries/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/19UseExternalLibraries/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/19UseExternalLibraries/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/19UseExternalLibraries/types/services/InsuranceService.d.ts b/TypeScript/19UseExternalLibraries/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/19UseExternalLibraries/types/services/InsuranceService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/19UseExternalLibraries/types/services/LocationLifecycleService.d.ts b/TypeScript/19UseExternalLibraries/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/19UseExternalLibraries/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/19UseExternalLibraries/types/services/PaymentService.d.ts b/TypeScript/19UseExternalLibraries/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/19UseExternalLibraries/types/services/PaymentService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/19UseExternalLibraries/types/services/PmcChatResponseService.d.ts b/TypeScript/19UseExternalLibraries/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/19UseExternalLibraries/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/19UseExternalLibraries/types/services/PostDbLoadService.d.ts b/TypeScript/19UseExternalLibraries/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/19UseExternalLibraries/types/services/SeasonalEventService.d.ts b/TypeScript/19UseExternalLibraries/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/19UseExternalLibraries/types/services/SeasonalEventService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/19UseExternalLibraries/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/19UseExternalLibraries/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/19UseExternalLibraries/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/19UseExternalLibraries/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/19UseExternalLibraries/types/utils/HttpFileUtil.d.ts b/TypeScript/19UseExternalLibraries/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/19UseExternalLibraries/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/19UseExternalLibraries/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/1LogToConsole/types/callbacks/HealthCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/1LogToConsole/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/1LogToConsole/types/callbacks/InraidCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/1LogToConsole/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/1LogToConsole/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/1LogToConsole/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/1LogToConsole/types/callbacks/MatchCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/1LogToConsole/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/1LogToConsole/types/context/ContextVariableType.d.ts b/TypeScript/1LogToConsole/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/1LogToConsole/types/context/ContextVariableType.d.ts +++ b/TypeScript/1LogToConsole/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/1LogToConsole/types/controllers/GameController.d.ts b/TypeScript/1LogToConsole/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/1LogToConsole/types/controllers/GameController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/1LogToConsole/types/controllers/HealthController.d.ts b/TypeScript/1LogToConsole/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/1LogToConsole/types/controllers/HealthController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts b/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/1LogToConsole/types/controllers/InsuranceController.d.ts b/TypeScript/1LogToConsole/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/1LogToConsole/types/controllers/InsuranceController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/1LogToConsole/types/controllers/InventoryController.d.ts b/TypeScript/1LogToConsole/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/1LogToConsole/types/controllers/InventoryController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/1LogToConsole/types/controllers/QuestController.d.ts b/TypeScript/1LogToConsole/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/1LogToConsole/types/controllers/QuestController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/1LogToConsole/types/di/Serializer.d.ts b/TypeScript/1LogToConsole/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/1LogToConsole/types/di/Serializer.d.ts +++ b/TypeScript/1LogToConsole/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/1LogToConsole/types/generators/BotLootGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/1LogToConsole/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/1LogToConsole/types/generators/LocationLootGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/1LogToConsole/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/1LogToConsole/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/1LogToConsole/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/1LogToConsole/types/generators/WeatherGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/1LogToConsole/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/1LogToConsole/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/1LogToConsole/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/1LogToConsole/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/1LogToConsole/types/helpers/TraderHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/1LogToConsole/types/helpers/TraderHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/1LogToConsole/types/models/eft/common/IGlobals.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/1LogToConsole/types/models/eft/common/ILocationBase.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/1LogToConsole/types/models/eft/common/tables/IItem.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/1LogToConsole/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/1LogToConsole/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/1LogToConsole/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/1LogToConsole/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/1LogToConsole/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/1LogToConsole/types/models/enums/ExitStatis.d.ts b/TypeScript/1LogToConsole/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/1LogToConsole/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/1LogToConsole/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/1LogToConsole/types/models/enums/ItemEventActions.d.ts b/TypeScript/1LogToConsole/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/1LogToConsole/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/1LogToConsole/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/1LogToConsole/types/models/enums/Season.d.ts b/TypeScript/1LogToConsole/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/1LogToConsole/types/models/enums/Season.d.ts +++ b/TypeScript/1LogToConsole/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/1LogToConsole/types/models/enums/SeasonalEventType.d.ts b/TypeScript/1LogToConsole/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/1LogToConsole/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/1LogToConsole/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/1LogToConsole/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/1LogToConsole/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/1LogToConsole/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/1LogToConsole/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/1LogToConsole/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/1LogToConsole/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/1LogToConsole/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IBotConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/1LogToConsole/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IItemConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/1LogToConsole/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/1LogToConsole/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/1LogToConsole/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/1LogToConsole/types/routers/ImageRouter.d.ts b/TypeScript/1LogToConsole/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/1LogToConsole/types/routers/ImageRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/1LogToConsole/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/1LogToConsole/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/1LogToConsole/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/1LogToConsole/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/1LogToConsole/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/1LogToConsole/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/1LogToConsole/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/1LogToConsole/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/1LogToConsole/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/1LogToConsole/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/1LogToConsole/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/1LogToConsole/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/1LogToConsole/types/servers/http/SptHttpListener.d.ts b/TypeScript/1LogToConsole/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/1LogToConsole/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/1LogToConsole/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts b/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts +++ b/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/1LogToConsole/types/services/LocationLifecycleService.d.ts b/TypeScript/1LogToConsole/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/1LogToConsole/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/1LogToConsole/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/1LogToConsole/types/services/PaymentService.d.ts b/TypeScript/1LogToConsole/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/1LogToConsole/types/services/PaymentService.d.ts +++ b/TypeScript/1LogToConsole/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/1LogToConsole/types/services/PmcChatResponseService.d.ts b/TypeScript/1LogToConsole/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/1LogToConsole/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/1LogToConsole/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/1LogToConsole/types/services/PostDbLoadService.d.ts b/TypeScript/1LogToConsole/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/1LogToConsole/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts b/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts +++ b/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/1LogToConsole/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/1LogToConsole/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/1LogToConsole/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/1LogToConsole/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/1LogToConsole/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/1LogToConsole/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/1LogToConsole/types/utils/HttpFileUtil.d.ts b/TypeScript/1LogToConsole/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/1LogToConsole/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/1LogToConsole/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/20CustomChatBot/types/callbacks/HealthCallbacks.d.ts b/TypeScript/20CustomChatBot/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/20CustomChatBot/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/20CustomChatBot/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/20CustomChatBot/types/callbacks/InraidCallbacks.d.ts b/TypeScript/20CustomChatBot/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/20CustomChatBot/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/20CustomChatBot/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/20CustomChatBot/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/20CustomChatBot/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/20CustomChatBot/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/20CustomChatBot/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/20CustomChatBot/types/callbacks/MatchCallbacks.d.ts b/TypeScript/20CustomChatBot/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/20CustomChatBot/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/20CustomChatBot/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/20CustomChatBot/types/context/ContextVariableType.d.ts b/TypeScript/20CustomChatBot/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/20CustomChatBot/types/context/ContextVariableType.d.ts +++ b/TypeScript/20CustomChatBot/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/20CustomChatBot/types/controllers/GameController.d.ts b/TypeScript/20CustomChatBot/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/20CustomChatBot/types/controllers/GameController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/20CustomChatBot/types/controllers/HealthController.d.ts b/TypeScript/20CustomChatBot/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/20CustomChatBot/types/controllers/HealthController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/20CustomChatBot/types/controllers/InraidController.d.ts b/TypeScript/20CustomChatBot/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/20CustomChatBot/types/controllers/InraidController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/20CustomChatBot/types/controllers/InsuranceController.d.ts b/TypeScript/20CustomChatBot/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/20CustomChatBot/types/controllers/InsuranceController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/20CustomChatBot/types/controllers/InventoryController.d.ts b/TypeScript/20CustomChatBot/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/20CustomChatBot/types/controllers/InventoryController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/20CustomChatBot/types/controllers/QuestController.d.ts b/TypeScript/20CustomChatBot/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/20CustomChatBot/types/controllers/QuestController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/20CustomChatBot/types/di/Serializer.d.ts b/TypeScript/20CustomChatBot/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/20CustomChatBot/types/di/Serializer.d.ts +++ b/TypeScript/20CustomChatBot/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/20CustomChatBot/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/20CustomChatBot/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/20CustomChatBot/types/generators/BotGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/20CustomChatBot/types/generators/BotGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/20CustomChatBot/types/generators/BotLootGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/20CustomChatBot/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/20CustomChatBot/types/generators/LocationLootGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/20CustomChatBot/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/20CustomChatBot/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/20CustomChatBot/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/20CustomChatBot/types/generators/WeatherGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/20CustomChatBot/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/20CustomChatBot/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/20CustomChatBot/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/20CustomChatBot/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/20CustomChatBot/types/helpers/InRaidHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/20CustomChatBot/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/20CustomChatBot/types/helpers/ItemHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/20CustomChatBot/types/helpers/ItemHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/20CustomChatBot/types/helpers/QuestHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/20CustomChatBot/types/helpers/QuestHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/20CustomChatBot/types/helpers/TraderHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/20CustomChatBot/types/helpers/TraderHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/20CustomChatBot/types/models/eft/common/IGlobals.d.ts b/TypeScript/20CustomChatBot/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/20CustomChatBot/types/models/eft/common/ILocationBase.d.ts b/TypeScript/20CustomChatBot/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/20CustomChatBot/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/20CustomChatBot/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/20CustomChatBot/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/20CustomChatBot/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/20CustomChatBot/types/models/eft/common/tables/IItem.d.ts b/TypeScript/20CustomChatBot/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/20CustomChatBot/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/20CustomChatBot/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/20CustomChatBot/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/20CustomChatBot/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/20CustomChatBot/types/models/enums/ExitStatis.d.ts b/TypeScript/20CustomChatBot/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/20CustomChatBot/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/20CustomChatBot/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/20CustomChatBot/types/models/enums/ItemEventActions.d.ts b/TypeScript/20CustomChatBot/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/20CustomChatBot/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/20CustomChatBot/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/20CustomChatBot/types/models/enums/Season.d.ts b/TypeScript/20CustomChatBot/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/20CustomChatBot/types/models/enums/Season.d.ts +++ b/TypeScript/20CustomChatBot/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/20CustomChatBot/types/models/enums/SeasonalEventType.d.ts b/TypeScript/20CustomChatBot/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/20CustomChatBot/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/20CustomChatBot/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/20CustomChatBot/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/20CustomChatBot/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/20CustomChatBot/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/20CustomChatBot/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/20CustomChatBot/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/20CustomChatBot/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IBotConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IItemConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/20CustomChatBot/types/routers/ImageRouter.d.ts b/TypeScript/20CustomChatBot/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/20CustomChatBot/types/routers/ImageRouter.d.ts +++ b/TypeScript/20CustomChatBot/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/20CustomChatBot/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/20CustomChatBot/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/20CustomChatBot/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/20CustomChatBot/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/20CustomChatBot/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/20CustomChatBot/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/20CustomChatBot/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/20CustomChatBot/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/20CustomChatBot/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/20CustomChatBot/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/20CustomChatBot/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/20CustomChatBot/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/20CustomChatBot/types/servers/http/SptHttpListener.d.ts b/TypeScript/20CustomChatBot/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/20CustomChatBot/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/20CustomChatBot/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/20CustomChatBot/types/services/InsuranceService.d.ts b/TypeScript/20CustomChatBot/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/20CustomChatBot/types/services/InsuranceService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/20CustomChatBot/types/services/LocationLifecycleService.d.ts b/TypeScript/20CustomChatBot/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/20CustomChatBot/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/20CustomChatBot/types/services/PaymentService.d.ts b/TypeScript/20CustomChatBot/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/20CustomChatBot/types/services/PaymentService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/20CustomChatBot/types/services/PmcChatResponseService.d.ts b/TypeScript/20CustomChatBot/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/20CustomChatBot/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/20CustomChatBot/types/services/PostDbLoadService.d.ts b/TypeScript/20CustomChatBot/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/20CustomChatBot/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/20CustomChatBot/types/services/SeasonalEventService.d.ts b/TypeScript/20CustomChatBot/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/20CustomChatBot/types/services/SeasonalEventService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/20CustomChatBot/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/20CustomChatBot/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/20CustomChatBot/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/20CustomChatBot/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/20CustomChatBot/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/20CustomChatBot/types/utils/HttpFileUtil.d.ts b/TypeScript/20CustomChatBot/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/20CustomChatBot/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/20CustomChatBot/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/21CustomCommandoCommand/types/callbacks/HealthCallbacks.d.ts b/TypeScript/21CustomCommandoCommand/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/21CustomCommandoCommand/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/21CustomCommandoCommand/types/callbacks/InraidCallbacks.d.ts b/TypeScript/21CustomCommandoCommand/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/21CustomCommandoCommand/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/21CustomCommandoCommand/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/21CustomCommandoCommand/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/21CustomCommandoCommand/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/21CustomCommandoCommand/types/callbacks/MatchCallbacks.d.ts b/TypeScript/21CustomCommandoCommand/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/21CustomCommandoCommand/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/21CustomCommandoCommand/types/context/ContextVariableType.d.ts b/TypeScript/21CustomCommandoCommand/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/21CustomCommandoCommand/types/context/ContextVariableType.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/GameController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/GameController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/HealthController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/HealthController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/InraidController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/InraidController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/InsuranceController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/InsuranceController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/InventoryController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/InventoryController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/QuestController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/QuestController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/21CustomCommandoCommand/types/di/Serializer.d.ts b/TypeScript/21CustomCommandoCommand/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/21CustomCommandoCommand/types/di/Serializer.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/21CustomCommandoCommand/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/21CustomCommandoCommand/types/generators/BotGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/BotGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/21CustomCommandoCommand/types/generators/BotLootGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/21CustomCommandoCommand/types/generators/LocationLootGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/21CustomCommandoCommand/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/21CustomCommandoCommand/types/generators/WeatherGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/InRaidHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/ItemHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/ItemHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/QuestHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/QuestHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/TraderHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/TraderHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/common/IGlobals.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/common/ILocationBase.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IItem.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/ExitStatis.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/ItemEventActions.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/Season.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/enums/Season.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/SeasonalEventType.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IBotConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IItemConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/21CustomCommandoCommand/types/routers/ImageRouter.d.ts b/TypeScript/21CustomCommandoCommand/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/21CustomCommandoCommand/types/routers/ImageRouter.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/21CustomCommandoCommand/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/21CustomCommandoCommand/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/21CustomCommandoCommand/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/21CustomCommandoCommand/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/21CustomCommandoCommand/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/21CustomCommandoCommand/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/21CustomCommandoCommand/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/21CustomCommandoCommand/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/21CustomCommandoCommand/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/21CustomCommandoCommand/types/servers/http/SptHttpListener.d.ts b/TypeScript/21CustomCommandoCommand/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/21CustomCommandoCommand/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/21CustomCommandoCommand/types/services/InsuranceService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/InsuranceService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/21CustomCommandoCommand/types/services/LocationLifecycleService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/21CustomCommandoCommand/types/services/PaymentService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/PaymentService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/21CustomCommandoCommand/types/services/PmcChatResponseService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/21CustomCommandoCommand/types/services/PostDbLoadService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/21CustomCommandoCommand/types/services/SeasonalEventService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/SeasonalEventService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/21CustomCommandoCommand/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/21CustomCommandoCommand/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/21CustomCommandoCommand/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/21CustomCommandoCommand/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/21CustomCommandoCommand/types/utils/HttpFileUtil.d.ts b/TypeScript/21CustomCommandoCommand/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/21CustomCommandoCommand/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/22CustomSptCommand/types/callbacks/HealthCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/22CustomSptCommand/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/22CustomSptCommand/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/22CustomSptCommand/types/callbacks/InraidCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/22CustomSptCommand/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/22CustomSptCommand/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/22CustomSptCommand/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/22CustomSptCommand/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/22CustomSptCommand/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/22CustomSptCommand/types/callbacks/MatchCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/22CustomSptCommand/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/22CustomSptCommand/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/22CustomSptCommand/types/context/ContextVariableType.d.ts b/TypeScript/22CustomSptCommand/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/22CustomSptCommand/types/context/ContextVariableType.d.ts +++ b/TypeScript/22CustomSptCommand/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/22CustomSptCommand/types/controllers/GameController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/22CustomSptCommand/types/controllers/GameController.d.ts +++ b/TypeScript/22CustomSptCommand/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/22CustomSptCommand/types/controllers/HealthController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/22CustomSptCommand/types/controllers/HealthController.d.ts +++ b/TypeScript/22CustomSptCommand/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/22CustomSptCommand/types/controllers/InraidController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/22CustomSptCommand/types/controllers/InraidController.d.ts +++ b/TypeScript/22CustomSptCommand/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/22CustomSptCommand/types/controllers/InsuranceController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/22CustomSptCommand/types/controllers/InsuranceController.d.ts +++ b/TypeScript/22CustomSptCommand/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/22CustomSptCommand/types/controllers/InventoryController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/22CustomSptCommand/types/controllers/InventoryController.d.ts +++ b/TypeScript/22CustomSptCommand/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/22CustomSptCommand/types/controllers/QuestController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/22CustomSptCommand/types/controllers/QuestController.d.ts +++ b/TypeScript/22CustomSptCommand/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/22CustomSptCommand/types/di/Serializer.d.ts b/TypeScript/22CustomSptCommand/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/22CustomSptCommand/types/di/Serializer.d.ts +++ b/TypeScript/22CustomSptCommand/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/22CustomSptCommand/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/22CustomSptCommand/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/22CustomSptCommand/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/22CustomSptCommand/types/generators/BotGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/22CustomSptCommand/types/generators/BotGenerator.d.ts +++ b/TypeScript/22CustomSptCommand/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/22CustomSptCommand/types/generators/BotLootGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/22CustomSptCommand/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/22CustomSptCommand/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/22CustomSptCommand/types/generators/LocationLootGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/22CustomSptCommand/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/22CustomSptCommand/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/22CustomSptCommand/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/22CustomSptCommand/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/22CustomSptCommand/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/22CustomSptCommand/types/generators/WeatherGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/22CustomSptCommand/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/22CustomSptCommand/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/22CustomSptCommand/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/22CustomSptCommand/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/22CustomSptCommand/types/helpers/InRaidHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/22CustomSptCommand/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/22CustomSptCommand/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/22CustomSptCommand/types/helpers/ItemHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/22CustomSptCommand/types/helpers/ItemHelper.d.ts +++ b/TypeScript/22CustomSptCommand/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/22CustomSptCommand/types/helpers/QuestHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/22CustomSptCommand/types/helpers/QuestHelper.d.ts +++ b/TypeScript/22CustomSptCommand/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/22CustomSptCommand/types/helpers/TraderHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/22CustomSptCommand/types/helpers/TraderHelper.d.ts +++ b/TypeScript/22CustomSptCommand/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/IGlobals.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/ILocationBase.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IItem.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/22CustomSptCommand/types/models/enums/ExitStatis.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/22CustomSptCommand/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/22CustomSptCommand/types/models/enums/ItemEventActions.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/22CustomSptCommand/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/22CustomSptCommand/types/models/enums/Season.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/22CustomSptCommand/types/models/enums/Season.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/22CustomSptCommand/types/models/enums/SeasonalEventType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/22CustomSptCommand/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/22CustomSptCommand/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/22CustomSptCommand/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/22CustomSptCommand/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IBotConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IItemConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/22CustomSptCommand/types/routers/ImageRouter.d.ts b/TypeScript/22CustomSptCommand/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/22CustomSptCommand/types/routers/ImageRouter.d.ts +++ b/TypeScript/22CustomSptCommand/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/22CustomSptCommand/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/22CustomSptCommand/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/22CustomSptCommand/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/22CustomSptCommand/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/22CustomSptCommand/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/22CustomSptCommand/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/22CustomSptCommand/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/22CustomSptCommand/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/22CustomSptCommand/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/22CustomSptCommand/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/22CustomSptCommand/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/22CustomSptCommand/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/22CustomSptCommand/types/servers/http/SptHttpListener.d.ts b/TypeScript/22CustomSptCommand/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/22CustomSptCommand/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/22CustomSptCommand/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/22CustomSptCommand/types/services/InsuranceService.d.ts b/TypeScript/22CustomSptCommand/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/22CustomSptCommand/types/services/InsuranceService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/22CustomSptCommand/types/services/LocationLifecycleService.d.ts b/TypeScript/22CustomSptCommand/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/22CustomSptCommand/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/22CustomSptCommand/types/services/PaymentService.d.ts b/TypeScript/22CustomSptCommand/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/22CustomSptCommand/types/services/PaymentService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/22CustomSptCommand/types/services/PmcChatResponseService.d.ts b/TypeScript/22CustomSptCommand/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/22CustomSptCommand/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/22CustomSptCommand/types/services/PostDbLoadService.d.ts b/TypeScript/22CustomSptCommand/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/22CustomSptCommand/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/22CustomSptCommand/types/services/SeasonalEventService.d.ts b/TypeScript/22CustomSptCommand/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/22CustomSptCommand/types/services/SeasonalEventService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/22CustomSptCommand/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/22CustomSptCommand/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/22CustomSptCommand/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/22CustomSptCommand/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/22CustomSptCommand/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/22CustomSptCommand/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/22CustomSptCommand/types/utils/HttpFileUtil.d.ts b/TypeScript/22CustomSptCommand/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/22CustomSptCommand/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/22CustomSptCommand/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/HealthCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/InraidCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/MatchCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/23CustomAbstractChatBot/types/context/ContextVariableType.d.ts b/TypeScript/23CustomAbstractChatBot/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/23CustomAbstractChatBot/types/context/ContextVariableType.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/GameController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/GameController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/HealthController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/HealthController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/InraidController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/InraidController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/InsuranceController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/InsuranceController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/InventoryController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/InventoryController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/QuestController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/QuestController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/23CustomAbstractChatBot/types/di/Serializer.d.ts b/TypeScript/23CustomAbstractChatBot/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/23CustomAbstractChatBot/types/di/Serializer.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/BotGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/BotGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/BotLootGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/LocationLootGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/WeatherGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/InRaidHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/ItemHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/ItemHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/QuestHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/QuestHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/TraderHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/TraderHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/IGlobals.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/ILocationBase.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IItem.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/ExitStatis.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/ItemEventActions.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/Season.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/Season.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/SeasonalEventType.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBotConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IItemConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/ImageRouter.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/ImageRouter.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/23CustomAbstractChatBot/types/servers/http/SptHttpListener.d.ts b/TypeScript/23CustomAbstractChatBot/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/23CustomAbstractChatBot/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/23CustomAbstractChatBot/types/services/InsuranceService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/InsuranceService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/23CustomAbstractChatBot/types/services/LocationLifecycleService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/23CustomAbstractChatBot/types/services/PaymentService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/PaymentService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/23CustomAbstractChatBot/types/services/PmcChatResponseService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/23CustomAbstractChatBot/types/services/PostDbLoadService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/services/SeasonalEventService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/SeasonalEventService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/23CustomAbstractChatBot/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/23CustomAbstractChatBot/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/23CustomAbstractChatBot/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/HttpFileUtil.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/23CustomAbstractChatBot/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/24WebSocket/types/callbacks/HealthCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/24WebSocket/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/24WebSocket/types/callbacks/InraidCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/24WebSocket/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/24WebSocket/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/24WebSocket/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/24WebSocket/types/callbacks/MatchCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/24WebSocket/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/24WebSocket/types/context/ContextVariableType.d.ts b/TypeScript/24WebSocket/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/24WebSocket/types/context/ContextVariableType.d.ts +++ b/TypeScript/24WebSocket/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/24WebSocket/types/controllers/GameController.d.ts b/TypeScript/24WebSocket/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/24WebSocket/types/controllers/GameController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/24WebSocket/types/controllers/HealthController.d.ts b/TypeScript/24WebSocket/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/24WebSocket/types/controllers/HealthController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/24WebSocket/types/controllers/InraidController.d.ts b/TypeScript/24WebSocket/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/24WebSocket/types/controllers/InraidController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/24WebSocket/types/controllers/InsuranceController.d.ts b/TypeScript/24WebSocket/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/24WebSocket/types/controllers/InsuranceController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/24WebSocket/types/controllers/InventoryController.d.ts b/TypeScript/24WebSocket/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/24WebSocket/types/controllers/InventoryController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/24WebSocket/types/controllers/QuestController.d.ts b/TypeScript/24WebSocket/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/24WebSocket/types/controllers/QuestController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/24WebSocket/types/di/Serializer.d.ts b/TypeScript/24WebSocket/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/24WebSocket/types/di/Serializer.d.ts +++ b/TypeScript/24WebSocket/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/24WebSocket/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/24WebSocket/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/24WebSocket/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/24WebSocket/types/generators/BotGenerator.d.ts b/TypeScript/24WebSocket/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/24WebSocket/types/generators/BotGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/24WebSocket/types/generators/BotLootGenerator.d.ts b/TypeScript/24WebSocket/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/24WebSocket/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/24WebSocket/types/generators/LocationLootGenerator.d.ts b/TypeScript/24WebSocket/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/24WebSocket/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/24WebSocket/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/24WebSocket/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/24WebSocket/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/24WebSocket/types/generators/WeatherGenerator.d.ts b/TypeScript/24WebSocket/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/24WebSocket/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/24WebSocket/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/24WebSocket/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/24WebSocket/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/24WebSocket/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/24WebSocket/types/helpers/InRaidHelper.d.ts b/TypeScript/24WebSocket/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/24WebSocket/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/24WebSocket/types/helpers/ItemHelper.d.ts b/TypeScript/24WebSocket/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/24WebSocket/types/helpers/ItemHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/24WebSocket/types/helpers/QuestHelper.d.ts b/TypeScript/24WebSocket/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/24WebSocket/types/helpers/QuestHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/24WebSocket/types/helpers/TraderHelper.d.ts b/TypeScript/24WebSocket/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/24WebSocket/types/helpers/TraderHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/24WebSocket/types/models/eft/common/IGlobals.d.ts b/TypeScript/24WebSocket/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/24WebSocket/types/models/eft/common/ILocationBase.d.ts b/TypeScript/24WebSocket/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/24WebSocket/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/24WebSocket/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/24WebSocket/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/24WebSocket/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/24WebSocket/types/models/eft/common/tables/IItem.d.ts b/TypeScript/24WebSocket/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/24WebSocket/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/24WebSocket/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/24WebSocket/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/24WebSocket/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/24WebSocket/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/24WebSocket/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/24WebSocket/types/models/enums/ExitStatis.d.ts b/TypeScript/24WebSocket/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/24WebSocket/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/24WebSocket/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/24WebSocket/types/models/enums/ItemEventActions.d.ts b/TypeScript/24WebSocket/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/24WebSocket/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/24WebSocket/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/24WebSocket/types/models/enums/Season.d.ts b/TypeScript/24WebSocket/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/24WebSocket/types/models/enums/Season.d.ts +++ b/TypeScript/24WebSocket/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/24WebSocket/types/models/enums/SeasonalEventType.d.ts b/TypeScript/24WebSocket/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/24WebSocket/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/24WebSocket/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/24WebSocket/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/24WebSocket/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/24WebSocket/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/24WebSocket/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/24WebSocket/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/24WebSocket/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/24WebSocket/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/24WebSocket/types/models/spt/config/IBotConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/24WebSocket/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/24WebSocket/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/24WebSocket/types/models/spt/config/IItemConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/24WebSocket/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/24WebSocket/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/24WebSocket/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/24WebSocket/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/24WebSocket/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/24WebSocket/types/routers/ImageRouter.d.ts b/TypeScript/24WebSocket/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/24WebSocket/types/routers/ImageRouter.d.ts +++ b/TypeScript/24WebSocket/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/24WebSocket/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/24WebSocket/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/24WebSocket/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/24WebSocket/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/24WebSocket/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/24WebSocket/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/24WebSocket/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/24WebSocket/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/24WebSocket/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/24WebSocket/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/24WebSocket/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/24WebSocket/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/24WebSocket/types/servers/http/SptHttpListener.d.ts b/TypeScript/24WebSocket/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/24WebSocket/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/24WebSocket/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/24WebSocket/types/services/InsuranceService.d.ts b/TypeScript/24WebSocket/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/24WebSocket/types/services/InsuranceService.d.ts +++ b/TypeScript/24WebSocket/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/24WebSocket/types/services/LocationLifecycleService.d.ts b/TypeScript/24WebSocket/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/24WebSocket/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/24WebSocket/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/24WebSocket/types/services/PaymentService.d.ts b/TypeScript/24WebSocket/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/24WebSocket/types/services/PaymentService.d.ts +++ b/TypeScript/24WebSocket/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/24WebSocket/types/services/PmcChatResponseService.d.ts b/TypeScript/24WebSocket/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/24WebSocket/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/24WebSocket/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/24WebSocket/types/services/PostDbLoadService.d.ts b/TypeScript/24WebSocket/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/24WebSocket/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/24WebSocket/types/services/SeasonalEventService.d.ts b/TypeScript/24WebSocket/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/24WebSocket/types/services/SeasonalEventService.d.ts +++ b/TypeScript/24WebSocket/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/24WebSocket/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/24WebSocket/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/24WebSocket/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/24WebSocket/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/24WebSocket/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/24WebSocket/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/24WebSocket/types/utils/HttpFileUtil.d.ts b/TypeScript/24WebSocket/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/24WebSocket/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/24WebSocket/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/2EditDatabase/types/callbacks/HealthCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/2EditDatabase/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/2EditDatabase/types/callbacks/InraidCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/2EditDatabase/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/2EditDatabase/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/2EditDatabase/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/2EditDatabase/types/callbacks/MatchCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/2EditDatabase/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/2EditDatabase/types/context/ContextVariableType.d.ts b/TypeScript/2EditDatabase/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/2EditDatabase/types/context/ContextVariableType.d.ts +++ b/TypeScript/2EditDatabase/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/2EditDatabase/types/controllers/GameController.d.ts b/TypeScript/2EditDatabase/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/2EditDatabase/types/controllers/GameController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/2EditDatabase/types/controllers/HealthController.d.ts b/TypeScript/2EditDatabase/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/2EditDatabase/types/controllers/HealthController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts b/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts b/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/2EditDatabase/types/controllers/InventoryController.d.ts b/TypeScript/2EditDatabase/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/2EditDatabase/types/controllers/InventoryController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/2EditDatabase/types/controllers/QuestController.d.ts b/TypeScript/2EditDatabase/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/2EditDatabase/types/controllers/QuestController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/2EditDatabase/types/di/Serializer.d.ts b/TypeScript/2EditDatabase/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/2EditDatabase/types/di/Serializer.d.ts +++ b/TypeScript/2EditDatabase/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/2EditDatabase/types/generators/BotLootGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/2EditDatabase/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/2EditDatabase/types/generators/LocationLootGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/2EditDatabase/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/2EditDatabase/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/2EditDatabase/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/2EditDatabase/types/generators/WeatherGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/2EditDatabase/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/2EditDatabase/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/2EditDatabase/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/2EditDatabase/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/2EditDatabase/types/helpers/TraderHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/2EditDatabase/types/helpers/TraderHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/2EditDatabase/types/models/eft/common/IGlobals.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/2EditDatabase/types/models/eft/common/ILocationBase.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/2EditDatabase/types/models/eft/common/tables/IItem.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/2EditDatabase/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/2EditDatabase/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/2EditDatabase/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/2EditDatabase/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/2EditDatabase/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/2EditDatabase/types/models/enums/ExitStatis.d.ts b/TypeScript/2EditDatabase/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/2EditDatabase/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/2EditDatabase/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/2EditDatabase/types/models/enums/ItemEventActions.d.ts b/TypeScript/2EditDatabase/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/2EditDatabase/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/2EditDatabase/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/2EditDatabase/types/models/enums/Season.d.ts b/TypeScript/2EditDatabase/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/2EditDatabase/types/models/enums/Season.d.ts +++ b/TypeScript/2EditDatabase/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/2EditDatabase/types/models/enums/SeasonalEventType.d.ts b/TypeScript/2EditDatabase/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/2EditDatabase/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/2EditDatabase/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/2EditDatabase/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/2EditDatabase/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/2EditDatabase/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/2EditDatabase/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/2EditDatabase/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/2EditDatabase/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/2EditDatabase/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IBotConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/2EditDatabase/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IItemConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/2EditDatabase/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/2EditDatabase/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/2EditDatabase/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/2EditDatabase/types/routers/ImageRouter.d.ts b/TypeScript/2EditDatabase/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/2EditDatabase/types/routers/ImageRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/2EditDatabase/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/2EditDatabase/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/2EditDatabase/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/2EditDatabase/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/2EditDatabase/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/2EditDatabase/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/2EditDatabase/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/2EditDatabase/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/2EditDatabase/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/2EditDatabase/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/2EditDatabase/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/2EditDatabase/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/2EditDatabase/types/servers/http/SptHttpListener.d.ts b/TypeScript/2EditDatabase/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/2EditDatabase/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/2EditDatabase/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts b/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts +++ b/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/2EditDatabase/types/services/LocationLifecycleService.d.ts b/TypeScript/2EditDatabase/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/2EditDatabase/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/2EditDatabase/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/2EditDatabase/types/services/PaymentService.d.ts b/TypeScript/2EditDatabase/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/2EditDatabase/types/services/PaymentService.d.ts +++ b/TypeScript/2EditDatabase/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/2EditDatabase/types/services/PmcChatResponseService.d.ts b/TypeScript/2EditDatabase/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/2EditDatabase/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/2EditDatabase/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/2EditDatabase/types/services/PostDbLoadService.d.ts b/TypeScript/2EditDatabase/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/2EditDatabase/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/2EditDatabase/types/services/SeasonalEventService.d.ts b/TypeScript/2EditDatabase/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/2EditDatabase/types/services/SeasonalEventService.d.ts +++ b/TypeScript/2EditDatabase/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/2EditDatabase/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/2EditDatabase/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/2EditDatabase/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/2EditDatabase/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/2EditDatabase/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/2EditDatabase/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/2EditDatabase/types/utils/HttpFileUtil.d.ts b/TypeScript/2EditDatabase/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/2EditDatabase/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/2EditDatabase/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/3GetSptConfigFile/types/callbacks/HealthCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/3GetSptConfigFile/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/3GetSptConfigFile/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/3GetSptConfigFile/types/callbacks/InraidCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/3GetSptConfigFile/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/3GetSptConfigFile/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/3GetSptConfigFile/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/3GetSptConfigFile/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/3GetSptConfigFile/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/3GetSptConfigFile/types/callbacks/MatchCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/3GetSptConfigFile/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/3GetSptConfigFile/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/3GetSptConfigFile/types/context/ContextVariableType.d.ts b/TypeScript/3GetSptConfigFile/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/3GetSptConfigFile/types/context/ContextVariableType.d.ts +++ b/TypeScript/3GetSptConfigFile/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/3GetSptConfigFile/types/controllers/GameController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/GameController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/3GetSptConfigFile/types/controllers/HealthController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/HealthController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/3GetSptConfigFile/types/controllers/InraidController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/InraidController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/3GetSptConfigFile/types/controllers/InsuranceController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/InsuranceController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/3GetSptConfigFile/types/controllers/InventoryController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/InventoryController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/3GetSptConfigFile/types/controllers/QuestController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/QuestController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/3GetSptConfigFile/types/di/Serializer.d.ts b/TypeScript/3GetSptConfigFile/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/3GetSptConfigFile/types/di/Serializer.d.ts +++ b/TypeScript/3GetSptConfigFile/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotLootGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/3GetSptConfigFile/types/generators/LocationLootGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/3GetSptConfigFile/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/3GetSptConfigFile/types/generators/WeatherGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/3GetSptConfigFile/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/3GetSptConfigFile/types/helpers/ItemHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/ItemHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/3GetSptConfigFile/types/helpers/TraderHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/TraderHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/IGlobals.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/ILocationBase.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IItem.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/ExitStatis.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/3GetSptConfigFile/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/ItemEventActions.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/3GetSptConfigFile/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/Season.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/3GetSptConfigFile/types/models/enums/Season.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/SeasonalEventType.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/3GetSptConfigFile/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/3GetSptConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IBotConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IItemConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/3GetSptConfigFile/types/routers/ImageRouter.d.ts b/TypeScript/3GetSptConfigFile/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/ImageRouter.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/3GetSptConfigFile/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/3GetSptConfigFile/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/3GetSptConfigFile/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/3GetSptConfigFile/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/3GetSptConfigFile/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/3GetSptConfigFile/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/3GetSptConfigFile/types/servers/http/SptHttpListener.d.ts b/TypeScript/3GetSptConfigFile/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/3GetSptConfigFile/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/3GetSptConfigFile/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/3GetSptConfigFile/types/services/InsuranceService.d.ts b/TypeScript/3GetSptConfigFile/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/3GetSptConfigFile/types/services/InsuranceService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/3GetSptConfigFile/types/services/LocationLifecycleService.d.ts b/TypeScript/3GetSptConfigFile/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/3GetSptConfigFile/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/3GetSptConfigFile/types/services/PaymentService.d.ts b/TypeScript/3GetSptConfigFile/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/3GetSptConfigFile/types/services/PaymentService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/3GetSptConfigFile/types/services/PmcChatResponseService.d.ts b/TypeScript/3GetSptConfigFile/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/3GetSptConfigFile/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/3GetSptConfigFile/types/services/PostDbLoadService.d.ts b/TypeScript/3GetSptConfigFile/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/3GetSptConfigFile/types/services/SeasonalEventService.d.ts b/TypeScript/3GetSptConfigFile/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/3GetSptConfigFile/types/services/SeasonalEventService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/3GetSptConfigFile/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/3GetSptConfigFile/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/3GetSptConfigFile/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/3GetSptConfigFile/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/3GetSptConfigFile/types/utils/HttpFileUtil.d.ts b/TypeScript/3GetSptConfigFile/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/3GetSptConfigFile/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/3GetSptConfigFile/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/HealthCallbacks.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/InraidCallbacks.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/MatchCallbacks.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/context/ContextVariableType.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/context/ContextVariableType.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/GameController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/GameController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/HealthController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/HealthController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InraidController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InraidController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InsuranceController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InsuranceController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InventoryController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InventoryController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/QuestController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/QuestController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/di/Serializer.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/di/Serializer.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotLootGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/LocationLootGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/WeatherGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InRaidHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/ItemHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/ItemHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/QuestHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/QuestHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/TraderHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/TraderHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/IGlobals.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/ILocationBase.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IItem.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/ExitStatis.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/ItemEventActions.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/Season.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/Season.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/SeasonalEventType.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IBotConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ 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 39c4f18..572d0b4 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IItemConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/ImageRouter.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/ImageRouter.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/http/SptHttpListener.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/InsuranceService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/InsuranceService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/LocationLifecycleService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/PaymentService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/PaymentService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/PmcChatResponseService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/PostDbLoadService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/SeasonalEventService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/SeasonalEventService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/HttpFileUtil.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/HealthCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/InraidCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/MatchCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/4UseACustomConfigFile/types/context/ContextVariableType.d.ts b/TypeScript/4UseACustomConfigFile/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/4UseACustomConfigFile/types/context/ContextVariableType.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/HealthController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/HealthController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/InventoryController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/InventoryController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/QuestController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/QuestController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/4UseACustomConfigFile/types/di/Serializer.d.ts b/TypeScript/4UseACustomConfigFile/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/4UseACustomConfigFile/types/di/Serializer.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotLootGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/4UseACustomConfigFile/types/generators/LocationLootGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/4UseACustomConfigFile/types/generators/WeatherGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/TraderHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/TraderHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/IGlobals.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILocationBase.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IItem.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/ExitStatis.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/ItemEventActions.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/Season.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/enums/Season.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/SeasonalEventType.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBotConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IItemConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/4UseACustomConfigFile/types/routers/ImageRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/ImageRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/4UseACustomConfigFile/types/servers/http/SptHttpListener.d.ts b/TypeScript/4UseACustomConfigFile/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/4UseACustomConfigFile/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/4UseACustomConfigFile/types/services/LocationLifecycleService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/4UseACustomConfigFile/types/services/PaymentService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/PaymentService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/4UseACustomConfigFile/types/services/PmcChatResponseService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/4UseACustomConfigFile/types/services/PostDbLoadService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/4UseACustomConfigFile/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/4UseACustomConfigFile/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/4UseACustomConfigFile/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/4UseACustomConfigFile/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/4UseACustomConfigFile/types/utils/HttpFileUtil.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/5ReplaceMethod/types/callbacks/HealthCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/5ReplaceMethod/types/callbacks/InraidCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/5ReplaceMethod/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/5ReplaceMethod/types/callbacks/MatchCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/5ReplaceMethod/types/context/ContextVariableType.d.ts b/TypeScript/5ReplaceMethod/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/5ReplaceMethod/types/context/ContextVariableType.d.ts +++ b/TypeScript/5ReplaceMethod/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/HealthController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/HealthController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/5ReplaceMethod/types/controllers/InventoryController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/InventoryController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/QuestController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/QuestController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/5ReplaceMethod/types/di/Serializer.d.ts b/TypeScript/5ReplaceMethod/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/5ReplaceMethod/types/di/Serializer.d.ts +++ b/TypeScript/5ReplaceMethod/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/5ReplaceMethod/types/generators/BotLootGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/5ReplaceMethod/types/generators/LocationLootGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/5ReplaceMethod/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/5ReplaceMethod/types/generators/WeatherGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/5ReplaceMethod/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/5ReplaceMethod/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/TraderHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/TraderHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/IGlobals.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/ILocationBase.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IItem.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/5ReplaceMethod/types/models/enums/ExitStatis.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/5ReplaceMethod/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/5ReplaceMethod/types/models/enums/ItemEventActions.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/5ReplaceMethod/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/5ReplaceMethod/types/models/enums/Season.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/5ReplaceMethod/types/models/enums/Season.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/5ReplaceMethod/types/models/enums/SeasonalEventType.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/5ReplaceMethod/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/5ReplaceMethod/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/5ReplaceMethod/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IBotConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IItemConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/5ReplaceMethod/types/routers/ImageRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/5ReplaceMethod/types/routers/ImageRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/5ReplaceMethod/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/5ReplaceMethod/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/5ReplaceMethod/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/5ReplaceMethod/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/5ReplaceMethod/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/5ReplaceMethod/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/5ReplaceMethod/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/5ReplaceMethod/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/5ReplaceMethod/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/5ReplaceMethod/types/servers/http/SptHttpListener.d.ts b/TypeScript/5ReplaceMethod/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/5ReplaceMethod/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/5ReplaceMethod/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts b/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/5ReplaceMethod/types/services/LocationLifecycleService.d.ts b/TypeScript/5ReplaceMethod/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/5ReplaceMethod/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/5ReplaceMethod/types/services/PaymentService.d.ts b/TypeScript/5ReplaceMethod/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/5ReplaceMethod/types/services/PaymentService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/5ReplaceMethod/types/services/PmcChatResponseService.d.ts b/TypeScript/5ReplaceMethod/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/5ReplaceMethod/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/5ReplaceMethod/types/services/PostDbLoadService.d.ts b/TypeScript/5ReplaceMethod/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts b/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/5ReplaceMethod/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/5ReplaceMethod/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/5ReplaceMethod/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/5ReplaceMethod/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/5ReplaceMethod/types/utils/HttpFileUtil.d.ts b/TypeScript/5ReplaceMethod/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/5ReplaceMethod/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/HealthCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/InraidCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/MatchCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/6ReferenceAnotherClass/types/context/ContextVariableType.d.ts b/TypeScript/6ReferenceAnotherClass/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/6ReferenceAnotherClass/types/context/ContextVariableType.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/HealthController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/HealthController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/InventoryController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/InventoryController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/QuestController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/QuestController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/6ReferenceAnotherClass/types/di/Serializer.d.ts b/TypeScript/6ReferenceAnotherClass/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/6ReferenceAnotherClass/types/di/Serializer.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotLootGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/LocationLootGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/WeatherGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/TraderHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/TraderHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/IGlobals.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILocationBase.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IItem.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/ExitStatis.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/ItemEventActions.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/Season.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/enums/Season.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/SeasonalEventType.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBotConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IItemConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/ImageRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/ImageRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/6ReferenceAnotherClass/types/servers/http/SptHttpListener.d.ts b/TypeScript/6ReferenceAnotherClass/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/6ReferenceAnotherClass/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/6ReferenceAnotherClass/types/services/LocationLifecycleService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/6ReferenceAnotherClass/types/services/PaymentService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/PaymentService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/6ReferenceAnotherClass/types/services/PmcChatResponseService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/6ReferenceAnotherClass/types/services/PostDbLoadService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/6ReferenceAnotherClass/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/6ReferenceAnotherClass/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/6ReferenceAnotherClass/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/HttpFileUtil.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/7OnLoadHook/types/callbacks/HealthCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/7OnLoadHook/types/callbacks/InraidCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/7OnLoadHook/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/7OnLoadHook/types/callbacks/MatchCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/7OnLoadHook/types/context/ContextVariableType.d.ts b/TypeScript/7OnLoadHook/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/7OnLoadHook/types/context/ContextVariableType.d.ts +++ b/TypeScript/7OnLoadHook/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts b/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/7OnLoadHook/types/controllers/HealthController.d.ts b/TypeScript/7OnLoadHook/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/7OnLoadHook/types/controllers/HealthController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts b/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts b/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/7OnLoadHook/types/controllers/InventoryController.d.ts b/TypeScript/7OnLoadHook/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/7OnLoadHook/types/controllers/InventoryController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/7OnLoadHook/types/controllers/QuestController.d.ts b/TypeScript/7OnLoadHook/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/7OnLoadHook/types/controllers/QuestController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/7OnLoadHook/types/di/Serializer.d.ts b/TypeScript/7OnLoadHook/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/7OnLoadHook/types/di/Serializer.d.ts +++ b/TypeScript/7OnLoadHook/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/7OnLoadHook/types/generators/BotLootGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/7OnLoadHook/types/generators/LocationLootGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/7OnLoadHook/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/7OnLoadHook/types/generators/WeatherGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/7OnLoadHook/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/7OnLoadHook/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/7OnLoadHook/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/7OnLoadHook/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/7OnLoadHook/types/helpers/TraderHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/7OnLoadHook/types/helpers/TraderHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/IGlobals.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/ILocationBase.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IItem.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/7OnLoadHook/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/7OnLoadHook/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/7OnLoadHook/types/models/enums/ExitStatis.d.ts b/TypeScript/7OnLoadHook/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/7OnLoadHook/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/7OnLoadHook/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/7OnLoadHook/types/models/enums/ItemEventActions.d.ts b/TypeScript/7OnLoadHook/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/7OnLoadHook/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/7OnLoadHook/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/7OnLoadHook/types/models/enums/Season.d.ts b/TypeScript/7OnLoadHook/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/7OnLoadHook/types/models/enums/Season.d.ts +++ b/TypeScript/7OnLoadHook/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/7OnLoadHook/types/models/enums/SeasonalEventType.d.ts b/TypeScript/7OnLoadHook/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/7OnLoadHook/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/7OnLoadHook/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/7OnLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/7OnLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/7OnLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/7OnLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/7OnLoadHook/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/7OnLoadHook/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IBotConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IItemConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/7OnLoadHook/types/routers/ImageRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/7OnLoadHook/types/routers/ImageRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/7OnLoadHook/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/7OnLoadHook/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/7OnLoadHook/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/7OnLoadHook/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/7OnLoadHook/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/7OnLoadHook/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/7OnLoadHook/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/7OnLoadHook/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/7OnLoadHook/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/7OnLoadHook/types/servers/http/SptHttpListener.d.ts b/TypeScript/7OnLoadHook/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/7OnLoadHook/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/7OnLoadHook/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts b/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/7OnLoadHook/types/services/LocationLifecycleService.d.ts b/TypeScript/7OnLoadHook/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/7OnLoadHook/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/7OnLoadHook/types/services/PaymentService.d.ts b/TypeScript/7OnLoadHook/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/7OnLoadHook/types/services/PaymentService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/7OnLoadHook/types/services/PmcChatResponseService.d.ts b/TypeScript/7OnLoadHook/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/7OnLoadHook/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/7OnLoadHook/types/services/PostDbLoadService.d.ts b/TypeScript/7OnLoadHook/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/7OnLoadHook/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts b/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/7OnLoadHook/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/7OnLoadHook/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/7OnLoadHook/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/7OnLoadHook/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/7OnLoadHook/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/7OnLoadHook/types/utils/HttpFileUtil.d.ts b/TypeScript/7OnLoadHook/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/7OnLoadHook/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/8OnUpdateHook/types/callbacks/HealthCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/8OnUpdateHook/types/callbacks/InraidCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/8OnUpdateHook/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/8OnUpdateHook/types/callbacks/MatchCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/8OnUpdateHook/types/context/ContextVariableType.d.ts b/TypeScript/8OnUpdateHook/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/8OnUpdateHook/types/context/ContextVariableType.d.ts +++ b/TypeScript/8OnUpdateHook/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/HealthController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/HealthController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/8OnUpdateHook/types/controllers/InventoryController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/InventoryController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/QuestController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/QuestController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/8OnUpdateHook/types/di/Serializer.d.ts b/TypeScript/8OnUpdateHook/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/8OnUpdateHook/types/di/Serializer.d.ts +++ b/TypeScript/8OnUpdateHook/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/8OnUpdateHook/types/generators/BotLootGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/8OnUpdateHook/types/generators/LocationLootGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/8OnUpdateHook/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/8OnUpdateHook/types/generators/WeatherGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/8OnUpdateHook/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/8OnUpdateHook/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/TraderHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/TraderHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/IGlobals.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/ILocationBase.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IItem.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/8OnUpdateHook/types/models/enums/ExitStatis.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/8OnUpdateHook/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/8OnUpdateHook/types/models/enums/ItemEventActions.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/8OnUpdateHook/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/8OnUpdateHook/types/models/enums/Season.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/8OnUpdateHook/types/models/enums/Season.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/8OnUpdateHook/types/models/enums/SeasonalEventType.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/8OnUpdateHook/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/8OnUpdateHook/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/8OnUpdateHook/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IBotConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IItemConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/8OnUpdateHook/types/routers/ImageRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/8OnUpdateHook/types/routers/ImageRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/8OnUpdateHook/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/8OnUpdateHook/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/8OnUpdateHook/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/8OnUpdateHook/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/8OnUpdateHook/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/8OnUpdateHook/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/8OnUpdateHook/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/8OnUpdateHook/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/8OnUpdateHook/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/8OnUpdateHook/types/servers/http/SptHttpListener.d.ts b/TypeScript/8OnUpdateHook/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/8OnUpdateHook/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/8OnUpdateHook/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts b/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/8OnUpdateHook/types/services/LocationLifecycleService.d.ts b/TypeScript/8OnUpdateHook/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/8OnUpdateHook/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/8OnUpdateHook/types/services/PaymentService.d.ts b/TypeScript/8OnUpdateHook/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/8OnUpdateHook/types/services/PaymentService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/8OnUpdateHook/types/services/PmcChatResponseService.d.ts b/TypeScript/8OnUpdateHook/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/8OnUpdateHook/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/8OnUpdateHook/types/services/PostDbLoadService.d.ts b/TypeScript/8OnUpdateHook/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts b/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/8OnUpdateHook/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/8OnUpdateHook/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/8OnUpdateHook/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/8OnUpdateHook/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/8OnUpdateHook/types/utils/HttpFileUtil.d.ts b/TypeScript/8OnUpdateHook/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/8OnUpdateHook/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; } diff --git a/TypeScript/9RouterHooks/types/callbacks/HealthCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/HealthCallbacks.d.ts index 840c9b1..8523479 100644 --- a/TypeScript/9RouterHooks/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/HealthCallbacks.d.ts @@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -14,14 +13,6 @@ export declare class HealthCallbacks { protected profileHelper: ProfileHelper; protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); - /** - * Custom spt server request found in modules/HealthSynchronizer.cs - * @param url - * @param info HealthListener.Instance.CurrentHealth class - * @param sessionID session id - * @returns empty response, no data sent back to client - */ - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; /** * Custom spt server request found in modules/QTEPatch.cs * @param url diff --git a/TypeScript/9RouterHooks/types/callbacks/InraidCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/InraidCallbacks.d.ts index 675403f..02b46f3 100644 --- a/TypeScript/9RouterHooks/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/InraidCallbacks.d.ts @@ -21,7 +21,7 @@ export declare class InraidCallbacks { */ registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/TypeScript/9RouterHooks/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/InventoryCallbacks.d.ts index e0968e6..cfbf6f3 100644 --- a/TypeScript/9RouterHooks/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/InventoryCallbacks.d.ts @@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -58,4 +59,5 @@ export declare class InventoryCallbacks { * Handle game/profile/items/moving - QuestFail */ failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/9RouterHooks/types/callbacks/MatchCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/MatchCallbacks.d.ts index b63c920..0ab9f02 100644 --- a/TypeScript/9RouterHooks/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/MatchCallbacks.d.ts @@ -1,5 +1,6 @@ import { MatchController } from "@spt/controllers/MatchController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; +import { IMetrics } from "@spt/models/eft/common/tables/IMatch"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; @@ -53,7 +54,7 @@ export declare class MatchCallbacks { /** Handle match/group/start_game */ joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ - getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; + getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** * Called periodically while in a group * Handle client/match/group/status diff --git a/TypeScript/9RouterHooks/types/context/ContextVariableType.d.ts b/TypeScript/9RouterHooks/types/context/ContextVariableType.d.ts index 38facc6..03a5188 100644 --- a/TypeScript/9RouterHooks/types/context/ContextVariableType.d.ts +++ b/TypeScript/9RouterHooks/types/context/ContextVariableType.d.ts @@ -3,7 +3,7 @@ export declare enum ContextVariableType { SESSION_ID = 0, /** Currently acive raid information */ RAID_CONFIGURATION = 1, - /** Timestamp when client first connected */ + /** SessionID + Timestamp when client first connected, has _ between values */ CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, diff --git a/TypeScript/9RouterHooks/types/controllers/GameController.d.ts b/TypeScript/9RouterHooks/types/controllers/GameController.d.ts index dbcbce2..cb9644a 100644 --- a/TypeScript/9RouterHooks/types/controllers/GameController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/GameController.d.ts @@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; -import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; -import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; -import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { PostDbLoadService } from "@spt/services/PostDbLoadService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; @@ -52,6 +50,7 @@ export declare class GameController { protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected localisationService: LocalisationService; + protected postDbLoadService: PostDbLoadService; protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; @@ -64,33 +63,16 @@ export declare class GameController { protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; - protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - protected pmcConfig: IPmcConfig; - protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, inventoryHelper: InventoryHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, postDbLoadService: PostDbLoadService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; protected migrate39xProfile(fullProfile: ISptProfile): void; - protected adjustHideoutCraftTimes(overrideSeconds: number): void; - /** - * Adjust all hideout craft times to be no higher than the override - */ - protected adjustHideoutBuildTimes(overrideSeconds: number): void; - protected adjustLocationBotValues(): void; - /** - * Out of date/incorrectly made trader mods forget this data - */ - protected checkTraderRepairValuesExist(): void; - protected addCustomLooseLootPositions(): void; - protected adjustLooseLootSpawnProbabilities(): void; - /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ - protected adjustMapBotLimits(): void; /** * Handle client/game/config */ @@ -119,48 +101,26 @@ export declare class GameController { * Handle singleplayer/settings/getRaidTime */ getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; - /** - * BSG have two values for shotgun dispersion, we make sure both have the same value - */ - protected fixShotgunDispersions(): void; /** * Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it * @param pmcProfile Player profile */ protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; - protected setAllDbItemsAsSellableOnFlea(): void; /** * When player logs in, iterate over all active effects and reduce timer * @param pmcProfile Profile to adjust values for */ protected updateProfileHealthValues(pmcProfile: IPmcData): void; - /** - * Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max - */ - protected fixBrokenOfflineMapWaves(): void; - /** - * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions - */ - protected fixRoguesSpawningInstantlyOnLighthouse(): void; /** * Send starting gifts to profile after x days * @param pmcProfile Profile to add gifts to */ protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; - /** - * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these - * waves to one bot when they're waiting to spawn for too long - */ - protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: ISptProfile): void; - /** - * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json - */ - protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile Profile of player to get name from @@ -171,13 +131,5 @@ export declare class GameController { * @param fullProfile Profile to check for dialog in */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; - /** - * Blank out the "test" mail message from prapor - */ - protected removePraporTestMessage(): void; - /** - * Make non-trigger-spawned raiders spawn earlier + always - */ - protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: ISptProfile): void; } diff --git a/TypeScript/9RouterHooks/types/controllers/HealthController.d.ts b/TypeScript/9RouterHooks/types/controllers/HealthController.d.ts index 5a0a0a6..a17efe3 100644 --- a/TypeScript/9RouterHooks/types/controllers/HealthController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/HealthController.d.ts @@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; import { IWorkoutData } from "@spt/models/eft/health/IWorkoutData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -25,15 +24,6 @@ export declare class HealthController { protected healthHelper: HealthHelper; protected cloner: ICloner; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); - /** - * stores in-raid player health - * @param pmcData Player profile - * @param info Request data - * @param sessionID Player id - * @param addEffects Should effects found be added or removed from profile - * @param deleteExistingEffects Should all prior effects be removed before apply new ones - */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData Player profile diff --git a/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts b/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts index 8f0bfc1..b9f69c2 100644 --- a/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts @@ -28,13 +28,13 @@ export declare class InraidController { */ addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; + savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void; /** * Get the inraid config from configs/inraid.json * @returns InRaid Config diff --git a/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts b/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts index 2701622..c982529 100644 --- a/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts @@ -176,6 +176,11 @@ export declare class InsuranceController { * @returns void */ protected sendMail(sessionID: string, insurance: IInsurance): void; + protected IsMapLabsAndInsuranceDisabled(insurance: IInsurance, labsId?: string): boolean; + /** + * Update IInsurance object with new messageTemplateId and wipe out items array data + */ + protected handleLabsInsurance(traderDialogMessages: Record, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/9RouterHooks/types/controllers/InventoryController.d.ts b/TypeScript/9RouterHooks/types/controllers/InventoryController.d.ts index c986ce8..fb81a2f 100644 --- a/TypeScript/9RouterHooks/types/controllers/InventoryController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/InventoryController.d.ts @@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; +import { IPinOrLockItemRequest } from "@spt/models/eft/inventory/IPinOrLockItemRequest"; import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; @@ -228,4 +229,13 @@ export declare class InventoryController { openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void; + /** + * Handle /client/game/profile/items/moving - PinLock + * Requires no response to client, only server change + * @param pmcData Players profile + * @param request Pin/Lock request data + * @param sessionID Session id + * @param output data to send back to client + */ + pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/9RouterHooks/types/controllers/QuestController.d.ts b/TypeScript/9RouterHooks/types/controllers/QuestController.d.ts index 270a70a..ac486e3 100644 --- a/TypeScript/9RouterHooks/types/controllers/QuestController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/QuestController.d.ts @@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -54,13 +53,6 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; - /** - * Does a provided quest have a level requirement equal to or below defined level - * @param quest Quest to check - * @param playerLevel level of player to test against quest - * @returns true if quest can be seen/accepted by player of defined level - */ - protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; /** * Handle QuestAccept event * Handle the client accepting a quest and starting it @@ -108,49 +100,6 @@ export declare class QuestController { * @returns ItemEvent client response */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Return a list of quests that would fail when supplied quest is completed - * @param completedQuestId quest completed id - * @returns array of IQuest objects - */ - protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; - /** - * Remove a quest entirely from a profile - * @param sessionId Player id - * @param questIdToRemove Qid of quest to remove - */ - protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; - /** - * Return quests that have different statuses - * @param preQuestStatusus Quests before - * @param postQuestStatuses Quests after - * @returns QuestStatusChange array - */ - protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; - /** - * Send a popup to player on successful completion of a quest - * @param sessionID session id - * @param pmcData Player profile - * @param completedQuestId Completed quest id - * @param questRewards Rewards given to player - */ - protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; - /** - * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile - * @param pmcData Player profile to update - * @param quests Quests to look for wait conditions in - * @param completedQuestId Quest just completed - */ - protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; - /** - * Fail the provided quests - * Update quest in profile, otherwise add fresh quest object with failed status - * @param sessionID session id - * @param pmcData player profile - * @param questsToFail quests to fail - * @param output Client output - */ - protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; /** * Handle QuestHandover event * @param pmcData Player profile diff --git a/TypeScript/9RouterHooks/types/di/Serializer.d.ts b/TypeScript/9RouterHooks/types/di/Serializer.d.ts index 56db477..a48dd58 100644 --- a/TypeScript/9RouterHooks/types/di/Serializer.d.ts +++ b/TypeScript/9RouterHooks/types/di/Serializer.d.ts @@ -1,5 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export declare class Serializer { - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(something: string): boolean; } diff --git a/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts index c2b531c..40c361f 100644 --- a/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts @@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator { * @returns itemHelper.getItem() result */ protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; + /** + * Given the passed in array of magaizne tpls, look up the min size set in config and return only those that have that size or larger + * @param modSpawnRequest Request data + * @param modPool Pool of magazine tpls to filter + * @returns Filtered pool of magazine tpls + */ + protected getFilterdMagazinePoolByCapacity(modSpawnRequest: IModToSpawnRequest, modPool: string[]): string[]; /** * Choose a weapon mod tpl for a given slot from a pool of choices * Checks chosen tpl is compatible with all existing weapon items diff --git a/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts index 6f76b37..2c7bba6 100644 --- a/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts @@ -1,8 +1,10 @@ import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; +import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -31,6 +33,7 @@ export declare class BotGenerator { protected botEquipmentFilterService: BotEquipmentFilterService; protected weightedRandomHelper: WeightedRandomHelper; protected botHelper: BotHelper; + protected botGeneratorHelper: BotGeneratorHelper; protected seasonalEventService: SeasonalEventService; protected itemFilterService: ItemFilterService; protected botNameService: BotNameService; @@ -38,7 +41,7 @@ export declare class BotGenerator { protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, botNameService: BotNameService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot @@ -48,7 +51,7 @@ export declare class BotGenerator { */ generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; /** - * Create 1 bots of the type/side/difficulty defined in botGenerationDetails + * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id * @param botGenerationDetails details on how to generate bots * @returns constructed bot @@ -76,6 +79,36 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Get exp for kill by bot difficulty + * @param experience Dict of difficulties and experience + * @param botDifficulty the killed bots difficulty + * @param role Role of bot (optional, used for error logging) + * @returns Experience for kill + */ + protected getExperienceRewardForKillByDifficulty(experience: Record, botDifficulty: string, role: string): number; + /** + * Get the standing value change when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getStandingChangeForKillByDifficulty(standingForKill: Record, botDifficulty: string, role: string): number; + /** + * Get the agressor bonus value when player kills a bot + * @param standingForKill Dictionary of standing values keyed by bot difficulty + * @param botDifficulty Difficulty of bot to look up + * @param role Role of bot (optional, used for error logging) + * @returns Standing change value + */ + protected getAgressorBonusByDifficulty(aggressorBonus: Record, botDifficulty: string, role: string): number; + /** + * Set weighting of flagged equipment to 0 + * @param botJsonTemplate Bot data to adjust + * @param botGenerationDetails Generation details of bot + */ + protected filterBlacklistedGear(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): void; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory diff --git a/TypeScript/9RouterHooks/types/generators/BotLootGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotLootGenerator.d.ts index 07f8b68..6bea787 100644 --- a/TypeScript/9RouterHooks/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotLootGenerator.d.ts @@ -71,14 +71,6 @@ export declare class BotLootGenerator { * @param botRole Role of bot (pmcBEAR/pmcUSEC) */ protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; - /** - * Get a biased random number - * @param min Smallest size - * @param max Biggest size - * @param nValue Value to bias choice - * @returns Chosen number - */ - protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached * @param pool Pool of items to pick from with weight diff --git a/TypeScript/9RouterHooks/types/generators/LocationLootGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/LocationLootGenerator.d.ts index 6ef0bbc..79dddb2 100644 --- a/TypeScript/9RouterHooks/types/generators/LocationLootGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/LocationLootGenerator.d.ts @@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { ILooseLoot, ISpawnpoint, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; +import { ILooseLoot, ISpawnpointTemplate, ISpawnpointsForced } from "@spt/models/eft/common/ILooseLoot"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -124,7 +124,7 @@ export declare class LocationLootGenerator { * @param forcedSpawnPoints forced Forced loot locations that must be added * @param locationName Name of map currently having force loot created for */ - protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string): void; + protected addForcedLoot(lootLocationTemplates: ISpawnpointTemplate[], forcedSpawnPoints: ISpawnpointsForced[], locationName: string, staticAmmoDist: Record): void; /** * Create array of item (with child items) and return * @param chosenComposedKey Key we want to look up items for @@ -132,7 +132,7 @@ export declare class LocationLootGenerator { * @param staticAmmoDist ammo distributions * @returns IContainerItem */ - protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record): IContainerItem; + protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record): IContainerItem; /** * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * @param items Items array to search diff --git a/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts index 3c88984..60d6c9d 100644 --- a/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts @@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator { protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; /** * Create one flea offer for a specific item + * @param sellerId Id of seller * @param itemWithChildren Item to create offer for * @param isPreset Is item a weapon preset - * @param itemDetails raw db item details + * @param itemToSellDetails Raw db item details * @returns Item array */ - protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; + protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise; /** * Generate trader offers on flea using the traders assort data * @param traderID Trader to generate offers for diff --git a/TypeScript/9RouterHooks/types/generators/WeatherGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/WeatherGenerator.d.ts index 476f29c..71d2826 100644 --- a/TypeScript/9RouterHooks/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/WeatherGenerator.d.ts @@ -66,5 +66,5 @@ export declare class WeatherGenerator { protected getWeightedWindSpeed(): number; protected getWeightedFog(): number; protected getWeightedRain(): number; - protected getRandomFloat(node: string): number; + protected getRandomFloat(node: string, precision?: number): number; } diff --git a/TypeScript/9RouterHooks/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/9RouterHooks/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 8d3aa97..759ebf1 100644 --- a/TypeScript/9RouterHooks/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; import { MailSendService } from "@spt/services/MailSendService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; export declare class SptDialogueChatBot implements IDialogueChatBot { protected profileHelper: ProfileHelper; protected randomUtil: RandomUtil; protected mailSendService: MailSendService; + protected seasonalEventService: SeasonalEventService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts index 11b4043..eda416e 100644 --- a/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts @@ -41,12 +41,16 @@ export declare class InRaidHelper { */ setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** - * Iterate over inventory items and remove the property that defines an item as Found in Raid - * Only removes property if item had FiR when entering raid - * @param postRaidProfile profile to update items for - * @returns Updated profile with SpawnedInSession removed + * Remove FiR status from items + * @param items Items to process */ - removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData; + protected removeFiRStatusFromCertainItems(items: IItem[]): void; + /** + * Add items from one parameter into another + * @param itemsToAdd Items we want to add + * @param serverInventoryItems Location to add items to + */ + protected addItemsToInventory(itemsToAdd: IItem[], serverInventoryItems: IItem[]): void; /** * Clear PMC inventory of all items except those that are exempt * Used post-raid to remove items after death diff --git a/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts index 366ad9b..24a6b38 100644 --- a/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts @@ -536,6 +536,11 @@ export declare class ItemHelper { */ getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getItemBaseType(tpl: string, rootOnly?: boolean): string; + /** + * Remove FiR status from passed in items + * @param items Items to update FiR status of + */ + removeSpawnedInSessionPropertyFromItems(items: IItem[]): void; } declare namespace ItemHelper { interface IItemSize { diff --git a/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts index 02fc439..ff0f72b 100644 --- a/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts @@ -12,6 +12,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; +import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; @@ -22,6 +23,7 @@ import { DatabaseService } from "@spt/services/DatabaseService"; import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; +import { PlayerService } from "@spt/services/PlayerService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -44,10 +46,11 @@ export declare class QuestHelper { protected traderHelper: TraderHelper; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; + protected playerService: PlayerService; protected configServer: ConfigServer; protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseService: DatabaseService, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, playerService: PlayerService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -260,6 +263,13 @@ export declare class QuestHelper { * @returns Array of reward objects */ applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; + /** + * Does the provided quest reward have a game version requirement to be given and does it match + * @param reward Reward to check + * @param gameVersion Version of game to check reward against + * @returns True if it has requirement, false if it doesnt pass check + */ + protected questRewardIsForGameEdition(reward: IQuestReward, gameVersion: string): boolean; /** * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile * also update client response recipeUnlocked array with craft id @@ -302,4 +312,63 @@ export declare class QuestHelper { * @returns Hours item will be available for */ getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle client/quest/list + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ + getClientQuests(sessionID: string): IQuest[]; + /** + * Return a list of quests that would fail when supplied quest is completed + * @param completedQuestId quest completed id + * @returns array of IQuest objects + */ + protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[]; + /** + * Fail the provided quests + * Update quest in profile, otherwise add fresh quest object with failed status + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + * @param output Client output + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void; + /** + * Send a popup to player on successful completion of a quest + * @param sessionID session id + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player + */ + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: IItem[]): void; + /** + * Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile + * @param pmcData Player profile to update + * @param quests Quests to look for wait conditions in + * @param completedQuestId Quest just completed + */ + protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void; + /** + * Remove a quest entirely from a profile + * @param sessionId Player id + * @param questIdToRemove Qid of quest to remove + */ + protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void; + /** + * Return quests that have different statuses + * @param preQuestStatusus Quests before + * @param postQuestStatuses Quests after + * @returns QuestStatusChange array + */ + protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean; } diff --git a/TypeScript/9RouterHooks/types/helpers/TraderHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/TraderHelper.d.ts index 0cce160..1eb3426 100644 --- a/TypeScript/9RouterHooks/types/helpers/TraderHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/TraderHelper.d.ts @@ -39,7 +39,7 @@ export declare class TraderHelper { * @param sessionID Players id * @returns Trader base */ - getTrader(traderID: string, sessionID: string): ITraderBase | undefined; + getTrader(traderID: string, sessionID: string): ITraderBase | any; /** * Get all assort data for a particular trader * @param traderId Trader to get assorts for diff --git a/TypeScript/9RouterHooks/types/models/eft/common/IGlobals.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/IGlobals.d.ts index f23b608..29f2abf 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/IGlobals.d.ts @@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { time: number; config: IConfig; + LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; AudioSettings: IAudioSettings; EnvironmentSettings: IEnvironmentSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } +export interface ILocationInfection { + Interchange: number; + Lighthouse: number; + RezervBase: number; + Sandbox: number; + Shoreline: number; + TarkovStreets: number; + Woods: number; + bigmap: number; + factory4: number; + laboratory: number; +} export interface IArtilleryShelling { ArtilleryMapsConfigs: Record; ProjectileExplosionParams: IProjectileExplosionParams; @@ -96,6 +109,7 @@ export interface IConfig { MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; + SeasonActivity: ISeasonActivity; MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; @@ -182,6 +196,14 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface ISeasonActivity { + InfectionHalloween: ISeasonActivityHalloween; +} +export interface ISeasonActivityHalloween { + DisplayUIEnabled: boolean; + Enabled: boolean; + ZombieBleedMul: number; +} export interface IEnvironmentSetting2 { EnvironmentUIData: IEnvironmentUIData; } @@ -262,6 +284,7 @@ export interface ITransitSettings { PercentageOfMissingEnergyRestore: number; PercentageOfMissingHealthRestore: number; PercentageOfMissingWaterRestore: number; + RestoreHealthOnDestroyedParts: boolean; ScavPriceMod: number; UsecPriceMod: number; active: boolean; @@ -634,6 +657,12 @@ export interface IEffects { HeavyBleeding: IHeavyBleeding; LightBleeding: ILightBleeding; BodyTemperature: IBodyTemperature; + ZombieInfection: IZombieInfection; +} +export interface IZombieInfection { + Dehydration: number; + HearingDebuffPercentage: number; + СumulativeTime: number; } export interface IExistence { EnergyLoopTime: number; @@ -1203,6 +1232,7 @@ export interface IInsurance { CoefOfSendingMessageTime: number; CoefOfHavingMarkOfUnknown: number; EditionSendingMessageTime: Record; + OnlyInDeathCase: boolean; } export interface IMessageSendTImeMultipler { multiplier: number; diff --git a/TypeScript/9RouterHooks/types/models/eft/common/ILocationBase.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/ILocationBase.d.ts index 473648d..75836b6 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/ILocationBase.d.ts @@ -77,6 +77,7 @@ export interface ILocationBase { EscapeTimeLimit: number; EscapeTimeLimitCoop: number; EscapeTimeLimitPVE: number; + Events: ILocationEvents; exit_access_time: number; ForceOnlineRaidInPVE: boolean; exit_count: number; @@ -99,6 +100,7 @@ export interface ILocationBase { export interface ITransit { activateAfterSec: string; active: boolean; + name: string; conditions: string; description: string; id: number; @@ -271,10 +273,36 @@ export interface IWave { slots_min: number; time_max: number; time_min: number; + /** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */ sptId?: string; ChanceGroup?: number; + /** 'pve' and/or 'regular' */ SpawnMode: string[]; } +export interface ILocationEvents { + Halloween2024: IHalloween2024; +} +export interface IHalloween2024 { + CrowdAttackBlockRadius: number; + CrowdAttackSpawnParams: CrowdAttackSpawnParam[]; + CrowdCooldownPerPlayerSec: number; + CrowdsLimit: number; + InfectedLookCoeff: number; + MaxCrowdAttackSpawnLimit: number; + MinInfectionPercentage: number; + MinSpawnDistToPlayer: number; + TargetPointSearchRadiusLimit: number; + ZombieCallDeltaRadius: number; + ZombieCallPeriodSec: number; + ZombieCallRadiusLimit: number; + ZombieMultiplier: number; + InfectionPercentage: number; +} +export interface CrowdAttackSpawnParam { + Difficulty: string; + Role: string; + Weight: number; +} export declare enum WildSpawnType { ASSAULT = "assault", MARKSMAN = "marksman", diff --git a/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts index 307277c..5becac2 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts @@ -93,6 +93,7 @@ export interface IBotInfoSettings { Experience: number; StandingForKill: number; AggressorBonus: number; + UseSimpleAnimator: boolean; } export interface IBan { banType: BanType; @@ -218,6 +219,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { Items: ICounterKeyValue[]; diff --git a/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotType.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotType.d.ts index 6d4b0c7..7581104 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotType.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotType.d.ts @@ -97,10 +97,14 @@ export interface IDifficultyCategories { Shoot: Record; } export interface IExperience { - aggressorBonus: number; + /** key = bot difficulty */ + aggressorBonus: Record; level: MinMax; - reward: MinMax; - standingForKill: number; + /** key = bot difficulty */ + reward: Record; + /** key = bot difficulty */ + standingForKill: Record; + useSimpleAnimator: boolean; } export interface IGeneration { items: IGenerationWeightingItems; diff --git a/TypeScript/9RouterHooks/types/models/eft/common/tables/IItem.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/tables/IItem.d.ts index 8139fa1..60b460f 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/IItem.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/IItem.d.ts @@ -42,12 +42,18 @@ export interface IUpd { SideEffect?: IUpdSideEffect; RepairKit?: IUpdRepairKit; CultistAmulet?: IUpdCultistAmulet; + PinLockState?: PinLockState; +} +export declare enum PinLockState { + FREE = "Free", + LOCKED = "Locked", + PINNED = "Pinned" } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { On: boolean; diff --git a/TypeScript/9RouterHooks/types/models/eft/common/tables/ITrader.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/tables/ITrader.d.ts index 9e161c8..6dd54c1 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/ITrader.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/ITrader.d.ts @@ -88,18 +88,23 @@ export interface IBarterScheme { } export interface ISuit { _id: string; + externalObtain: boolean; + internalObtain: boolean; + isHiddenInPVE: boolean; tid: string; suiteId: string; isActive: boolean; requirements: ISuitRequirements; } export interface ISuitRequirements { + achievementRequirements: string[]; loyaltyLevel: number; profileLevel: number; standing: number; skillRequirements: string[]; questRequirements: string[]; itemRequirements: ItemRequirement[]; + requiredTid: string; } export interface ItemRequirement { count: number; diff --git a/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutProduction.d.ts index 1926311..8f2af05 100644 --- a/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutProduction.d.ts @@ -17,6 +17,7 @@ export interface IHideoutProduction { continuous: boolean; count: number; productionLimitCount: number; + isCodeProduction: boolean; } export interface IRequirement extends IRequirementBase { templateId?: string; diff --git a/TypeScript/9RouterHooks/types/models/eft/inRaid/IScavSaveRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/inRaid/IScavSaveRequestData.d.ts index e96a9ed..3f26e26 100644 --- a/TypeScript/9RouterHooks/types/models/eft/inRaid/IScavSaveRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/inRaid/IScavSaveRequestData.d.ts @@ -1,4 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; +export interface IScavSaveRequestData extends IPostRaidPmcData { } diff --git a/TypeScript/9RouterHooks/types/models/eft/inventory/IPinOrLockItemRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/inventory/IPinOrLockItemRequest.d.ts new file mode 100644 index 0000000..c39b404 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/inventory/IPinOrLockItemRequest.d.ts @@ -0,0 +1,8 @@ +import { PinLockState } from "../common/tables/IItem"; +export interface IPinOrLockItemRequest { + Action: "PinLock"; + /** Id of item being pinned */ + Item: string; + /** "Pinned"/"Locked"/"Free" */ + State: PinLockState; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 08e3c12..cc5b0c5 100644 --- a/TypeScript/9RouterHooks/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; - /** "Survived/Transit etc" */ - result: string; - ExitStatus: ExitStatus; + /** "Survived/Transit" etc */ + result: ExitStatus; killerId: string; killerAid: string; + /** "Gate 3" etc */ exitName: string; inSession: boolean; favorite: boolean; + /** Seconds in raid */ playTime: number; } export interface ILocationTransit { @@ -33,6 +34,8 @@ export interface ILocationTransit { raidMode: string; side: string; dayTime: string; + /** The location player last visited */ + sptLastVisitedLocation: string; } export interface ITransitProfile { _id: string; diff --git a/TypeScript/9RouterHooks/types/models/enums/ExitStatis.d.ts b/TypeScript/9RouterHooks/types/models/enums/ExitStatis.d.ts index 78d9733..2533076 100644 --- a/TypeScript/9RouterHooks/types/models/enums/ExitStatis.d.ts +++ b/TypeScript/9RouterHooks/types/models/enums/ExitStatis.d.ts @@ -1,7 +1,8 @@ export declare enum ExitStatus { - SURVIVED = 0, - KILLED = 1, - LEFT = 2, - RUNNER = 3, - MISSINGINACTION = 4 + SURVIVED = "Survived", + KILLED = "Killed", + LEFT = "Left", + RUNNER = "Runner", + MISSINGINACTION = "MissingInAction", + TRANSIT = "Transit" } diff --git a/TypeScript/9RouterHooks/types/models/enums/ItemEventActions.d.ts b/TypeScript/9RouterHooks/types/models/enums/ItemEventActions.d.ts index f8a8b5a..3541ae8 100644 --- a/TypeScript/9RouterHooks/types/models/enums/ItemEventActions.d.ts +++ b/TypeScript/9RouterHooks/types/models/enums/ItemEventActions.d.ts @@ -25,5 +25,6 @@ export declare enum ItemEventActions { REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REDEEM_PROFILE_REWARD = "RedeemProfileReward", SET_FAVORITE_ITEMS = "SetFavoriteItems", - QUEST_FAIL = "QuestFail" + QUEST_FAIL = "QuestFail", + PIN_LOCK = "PinLock" } diff --git a/TypeScript/9RouterHooks/types/models/enums/Season.d.ts b/TypeScript/9RouterHooks/types/models/enums/Season.d.ts index b1d3662..aae50b9 100644 --- a/TypeScript/9RouterHooks/types/models/enums/Season.d.ts +++ b/TypeScript/9RouterHooks/types/models/enums/Season.d.ts @@ -3,5 +3,7 @@ export declare enum Season { AUTUMN = 1, WINTER = 2, SPRING = 3, - STORM = 4 + AUTUMN_LATE = 4, + SPRING_EARLY = 5, + STORM = 6 } diff --git a/TypeScript/9RouterHooks/types/models/enums/SeasonalEventType.d.ts b/TypeScript/9RouterHooks/types/models/enums/SeasonalEventType.d.ts index cfea1f5..5e67118 100644 --- a/TypeScript/9RouterHooks/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/9RouterHooks/types/models/enums/SeasonalEventType.d.ts @@ -4,5 +4,5 @@ export declare enum SeasonalEventType { HALLOWEEN = "Halloween", NEW_YEARS = "NewYears", PROMO = "Promo", - SNOW = "Snow" + APRIL_FOOLS = "AprilFools" } diff --git a/TypeScript/9RouterHooks/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/9RouterHooks/types/models/enums/WildSpawnTypeNumber.d.ts index ab823cc..d93c13b 100644 --- a/TypeScript/9RouterHooks/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/9RouterHooks/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59 + SECTANTONI = 59, + INFECTEDASSAULT = 60, + INFECTEDPMC = 61, + INFECTEDCIVIL = 62, + INFECTEDLABORANT = 63, + INFECTEDTAGILLA = 64 } diff --git a/TypeScript/9RouterHooks/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/9RouterHooks/types/models/spt/bots/IModToSpawnRequest.d.ts index b34bda8..c004664 100644 --- a/TypeScript/9RouterHooks/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; /** Will generate a randomised mod pool if true */ isRandomisableSlot: boolean; + randomisationSettings: IRandomisationDetails; /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IBotConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IBotConfig.d.ts index 51a82b3..92f7b34 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IBotConfig.d.ts @@ -160,6 +160,8 @@ export interface IRandomisationDetails { /** Equipment mod chances */ equipmentMods?: Record; nighttimeChanges?: INighttimeChanges; + /** Key = weapon tpl, value = min size of magaizne allowed */ + minimumMagazineSize?: Record; } export interface INighttimeChanges { /** Applies changes to values stored in equipmentMods */ @@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment?: Record; + /** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */ + gear?: Record; /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge?: Record; } export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ diff --git a/TypeScript/9RouterHooks/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/ICoreConfig.d.ts index 39c4f18..572d0b4 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/ICoreConfig.d.ts @@ -71,6 +71,7 @@ export interface IChatbotFeatures { commandoEnabled: boolean; commandoFeatures: ICommandoFeatures; commandUseLimits: Record; + ids: Record; } export interface ICommandoFeatures { giveCommandEnabled: boolean; diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IInsuranceConfig.d.ts index 6c90fe0..fd15e94 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IInsuranceConfig.d.ts @@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig { blacklistedEquipment: string[]; /** Some slots should always be removed, e.g. 'cartridges' */ slotIdsToAlwaysRemove: string[]; - /** Override to control how quickly insurance is processed/returned in second */ + /** Override to control how quickly insurance is processed/returned in seconds */ returnTimeOverrideSeconds: number; + /** Override to control how long insurance returns stay in mail before expiring - in seconds */ + storageTimeOverrideSeconds: number; /** How often server should process insurance in seconds */ runIntervalSeconds: number; minAttachmentRoublePriceToBeTaken: number; diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IItemConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IItemConfig.d.ts index b9dfaea..a8833bf 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IItemConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IItemConfig.d.ts @@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig { rewardItemBlacklist: string[]; /** Items that can only be found on bosses */ bossItems: string[]; - handbookPriceOverride: Record; + handbookPriceOverride: Record; +} +export interface IHandbookPriceOverride { + /** Price in roubles */ + price: number; + /** NOT parentId from items.json, but handbook.json */ + parentId: string; } diff --git a/TypeScript/9RouterHooks/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/ILocationConfig.d.ts index 55123d6..cbccd20 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/ILocationConfig.d.ts @@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase" import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "spt-location"; - /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ @@ -44,6 +42,14 @@ export interface ILocationConfig extends IBaseConfig { scavRaidTimeSettings: IScavRaidTimeSettings; /** Settings to adjust mods for lootable equipment in raid */ equipmentLootSettings: IEquipmentLootSettings; + /** min percentage to set raider spawns at, -1 makes no changes */ + reserveRaiderSpawnChanceOverrides: IReserveRaiderSpawnChanceOverrides; + /** Map ids players cannot visit */ + nonMaps: string[]; +} +export interface IReserveRaiderSpawnChanceOverrides { + nonTriggered: number; + triggered: number; } export interface IEquipmentLootSettings { modSpawnChancePercent: Record; diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IQuestConfig.d.ts index e4e76eb..19bb3aa 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IQuestConfig.d.ts @@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig { usecOnlyQuests: string[]; /** Quests that the keyed game version do not see/access */ profileBlacklist: Record; - /** Quests that only the keyed game version can see/access */ + /** key=questid, gameversions that can see/access quest */ profileWhitelist: Record; } export interface IPlayerTypeQuestIds { diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IRagfairConfig.d.ts index 9b17861..36122c5 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IRagfairConfig.d.ts @@ -50,6 +50,8 @@ export interface IDynamic { priceRanges: IPriceRanges; /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ showDefaultPresetsOnly: boolean; + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + ignoreQualityPriceVarianceBlacklist: string[]; endTimeSeconds: MinMax; /** Settings to control the durability range of item items listed on flea */ condition: Condition; @@ -90,6 +92,8 @@ export interface IBarterDetails { priceRangeVariancePercent: number; /** Min rouble price for an offer to be considered for turning into a barter */ minRoubleCostToBecomeBarter: number; + /** Should barter offers only single stack */ + makeSingleStackOnly: boolean; /** Item Tpls to never be turned into a barter */ itemTypeBlacklist: string[]; } diff --git a/TypeScript/9RouterHooks/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/ISeasonalEventConfig.d.ts index 1280bc5..5e119fa 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,4 +1,4 @@ -import { IBossLocationSpawn } from "@spt/models/eft/common/ILocationBase"; +import { IAdditionalHostilitySettings, IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { @@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig { events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; + eventWaves: Record>; gifterSettings: IGifterSetting[]; + /** key = event, second key = map name */ + hostilitySettingsForEvent: Record>; } export interface ISeasonalEvent { + enabled: boolean; name: string; type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; endMonth: number; + settings?: Record; +} +export interface IZombieSettings { + enabled: boolean; + mapInfectionAmount: Record; + disableBosses: string[]; + disableWaves: string[]; } export interface IGifterSetting { map: string; diff --git a/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts index 31a213b..5d2d4a6 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts @@ -47,6 +47,10 @@ export interface IFenceConfig { blacklist: string[]; coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; + /** Smallest value player rep with fence can fall to */ + playerRepMin: number; + /** Highest value player rep with fence can climb to */ + playerRepMax: number; } export interface IItemDurabilityCurrentMax { current: MinMax; diff --git a/TypeScript/9RouterHooks/types/routers/ImageRouter.d.ts b/TypeScript/9RouterHooks/types/routers/ImageRouter.d.ts index ca9afad..cd29c81 100644 --- a/TypeScript/9RouterHooks/types/routers/ImageRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/ImageRouter.d.ts @@ -8,6 +8,6 @@ export declare class ImageRouter { protected httpFileUtil: HttpFileUtil; constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); addRoute(key: string, valueToAdd: string): void; - sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; getImage(): string; } diff --git a/TypeScript/9RouterHooks/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/9RouterHooks/types/routers/serializers/BundleSerializer.d.ts index 91332ff..93e647d 100644 --- a/TypeScript/9RouterHooks/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/9RouterHooks/types/routers/serializers/BundleSerializer.d.ts @@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer { protected bundleLoader: BundleLoader; protected httpFileUtil: HttpFileUtil; constructor(logger: ILogger, bundleLoader: BundleLoader, httpFileUtil: HttpFileUtil); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/9RouterHooks/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/9RouterHooks/types/routers/serializers/ImageSerializer.d.ts index 92f06e3..84430c7 100644 --- a/TypeScript/9RouterHooks/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/9RouterHooks/types/routers/serializers/ImageSerializer.d.ts @@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter"; export declare class ImageSerializer extends Serializer { protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); - serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; + serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/9RouterHooks/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/9RouterHooks/types/routers/serializers/NotifySerializer.d.ts index 4e1f28d..20d9095 100644 --- a/TypeScript/9RouterHooks/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/9RouterHooks/types/routers/serializers/NotifySerializer.d.ts @@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer { protected jsonUtil: JsonUtil; protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper); - serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): void; + serialize(_sessionID: string, req: IncomingMessage, resp: ServerResponse, _: any): Promise; canHandle(route: string): boolean; } diff --git a/TypeScript/9RouterHooks/types/servers/http/SptHttpListener.d.ts b/TypeScript/9RouterHooks/types/servers/http/SptHttpListener.d.ts index 9311f82..64d4f04 100644 --- a/TypeScript/9RouterHooks/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/9RouterHooks/types/servers/http/SptHttpListener.d.ts @@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener { * @param body Buffer * @param output Server generated response data */ - sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): Promise; /** * Is request flagged as debug enabled * @param req Incoming request @@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener { getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; - sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; + sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise; } diff --git a/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts b/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts index 8b7b1b3..ac9cff5 100644 --- a/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts +++ b/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts @@ -70,6 +70,7 @@ export declare class InsuranceService { * @returns void */ protected adoptOrphanedInsEquipment(sessionID: string): void; + protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it * @param equipmentPkg Gear to store - generated by getGearLostInRaid() diff --git a/TypeScript/9RouterHooks/types/services/LocationLifecycleService.d.ts b/TypeScript/9RouterHooks/types/services/LocationLifecycleService.d.ts index ba90302..53b83e8 100644 --- a/TypeScript/9RouterHooks/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/9RouterHooks/types/services/LocationLifecycleService.d.ts @@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator"; import { HealthHelper } from "@spt/helpers/HealthHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { QuestHelper } from "@spt/helpers/QuestHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; @@ -46,6 +47,7 @@ export declare class LocationLifecycleService { protected databaseService: DatabaseService; protected inRaidHelper: InRaidHelper; protected healthHelper: HealthHelper; + protected questHelper: QuestHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected pmcChatResponseService: PmcChatResponseService; protected playerScavGenerator: PlayerScavGenerator; @@ -68,7 +70,7 @@ export declare class LocationLifecycleService { protected hideoutConfig: IHideoutConfig; protected locationConfig: ILocationConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, inRaidHelper: InRaidHelper, healthHelper: HealthHelper, questHelper: QuestHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, pmcChatResponseService: PmcChatResponseService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, localisationService: LocalisationService, insuranceService: InsuranceService, botLootCacheService: BotLootCacheService, configServer: ConfigServer, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, raidTimeAdjustmentService: RaidTimeAdjustmentService, botNameService: BotNameService, lootGenerator: LootGenerator, applicationContext: ApplicationContext, locationLootGenerator: LocationLootGenerator, cloner: ICloner); /** Handle client/match/local/start */ startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; /** @@ -139,10 +141,21 @@ export declare class LocationLifecycleService { * @param locationName */ protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + /** + * In 0.15 Lightkeeper quests do not give rewards in PvE, this issue also occurs in spt + * We check for newly completed Lk quests and run them through the servers `CompleteQuest` process + * This rewards players with items + craft unlocks + new trader assorts + * @param sessionId Session id + * @param postRaidQuests Quest statuses post-raid + * @param preRaidQuests Quest statuses pre-raid + * @param pmcProfile Players profile + */ + protected lightkeeperQuestWorkaround(sessionId: string, postRaidQuests: IQuestStatus[], preRaidQuests: IQuestStatus[], pmcProfile: IPmcData): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 - * @param questsToProcess + * @param questsToProcess quests data from client + * @param preRaidQuestStatuses quest data from before raid * @returns IQuestStatus */ protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; diff --git a/TypeScript/9RouterHooks/types/services/PaymentService.d.ts b/TypeScript/9RouterHooks/types/services/PaymentService.d.ts index 51fced1..f6ec79d 100644 --- a/TypeScript/9RouterHooks/types/services/PaymentService.d.ts +++ b/TypeScript/9RouterHooks/types/services/PaymentService.d.ts @@ -60,8 +60,9 @@ export declare class PaymentService { */ addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items diff --git a/TypeScript/9RouterHooks/types/services/PmcChatResponseService.d.ts b/TypeScript/9RouterHooks/types/services/PmcChatResponseService.d.ts index f44b12d..d1df249 100644 --- a/TypeScript/9RouterHooks/types/services/PmcChatResponseService.d.ts +++ b/TypeScript/9RouterHooks/types/services/PmcChatResponseService.d.ts @@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocaleService } from "@spt/services/LocaleService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -19,12 +20,13 @@ export declare class PmcChatResponseService { protected notificationSendHelper: NotificationSendHelper; protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected localisationService: LocalisationService; + protected localeService: LocaleService; protected giftService: GiftService; protected weightedRandomHelper: WeightedRandomHelper; protected configServer: ConfigServer; protected pmcResponsesConfig: IPmcChatResponse; protected giftConfig: IGiftsConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, notificationSendHelper: NotificationSendHelper, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, localeService: LocaleService, giftService: GiftService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); /** * For each PMC victim of the player, have a chance to send a message to the player, can be positive or negative * @param sessionId Session id @@ -43,9 +45,17 @@ export declare class PmcChatResponseService { * Choose a localised message to send the player (different if sender was killed or killed player) * @param isVictim Is the message coming from a bot killed by the player * @param pmcData Player profile + * @param victimData OPTIMAL - details of the pmc killed * @returns Message from PMC to player */ - protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined; + protected chooseMessage(isVictim: boolean, pmcData: IPmcData, victimData?: IVictim): string | undefined; + /** + * use map key to get a localised location name + * e.g. factory4_day becomes "Factory" + * @param locationKey location key to localise + * @returns Localised location name + */ + protected getLocationName(locationKey: string): string; /** * Should capitalisation be stripped from the message response before sending * @param isVictim Was responder a victim of player @@ -63,7 +73,7 @@ export declare class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean; + protected appendSuffixToMessageEnd(isVictim: boolean): boolean; /** * Choose a type of response based on the weightings in pmc response config * @param isVictim Was responder killed by player diff --git a/TypeScript/9RouterHooks/types/services/PostDbLoadService.d.ts b/TypeScript/9RouterHooks/types/services/PostDbLoadService.d.ts new file mode 100644 index 0000000..c9e4bbe --- /dev/null +++ b/TypeScript/9RouterHooks/types/services/PostDbLoadService.d.ts @@ -0,0 +1,77 @@ +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; +import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; +import { ILootConfig } from "@spt/models/spt/config/ILootConfig"; +import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; +import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; +import { LocalisationService } from "@spt/services/LocalisationService"; +import { OpenZoneService } from "@spt/services/OpenZoneService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class PostDbLoadService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected localisationService: LocalisationService; + protected customLocationWaveService: CustomLocationWaveService; + protected openZoneService: OpenZoneService; + protected seasonalEventService: SeasonalEventService; + protected itemBaseClassService: ItemBaseClassService; + protected configServer: ConfigServer; + protected cloner: ICloner; + protected coreConfig: ICoreConfig; + protected locationConfig: ILocationConfig; + protected ragfairConfig: IRagfairConfig; + protected hideoutConfig: IHideoutConfig; + protected pmcConfig: IPmcConfig; + protected lootConfig: ILootConfig; + protected botConfig: IBotConfig; + constructor(logger: ILogger, databaseService: DatabaseService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, configServer: ConfigServer, cloner: ICloner); + performPostDbLoadActions(): void; + protected adjustMinReserveRaiderSpawnChance(): void; + protected addCustomLooseLootPositions(): void; + /** + * BSG have two values for shotgun dispersion, we make sure both have the same value + */ + protected fixShotgunDispersions(): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + protected adjustLooseLootSpawnProbabilities(): void; + /** + * Out of date/incorrectly made trader mods forget this data + */ + protected checkTraderRepairValuesExist(): void; + protected adjustLocationBotValues(): void; + /** + * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions + */ + protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these + * waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; + /** + * Make non-trigger-spawned raiders spawn earlier + always + */ + protected adjustLabsRaiderSpawnRate(): void; + protected adjustHideoutCraftTimes(overrideSeconds: number): void; + /** + * Adjust all hideout craft times to be no higher than the override + */ + protected adjustHideoutBuildTimes(overrideSeconds: number): void; + /** + * Blank out the "test" mail message from prapor + */ + protected removePraporTestMessage(): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json + */ + protected validateQuestAssortUnlocksExist(): void; + protected setAllDbItemsAsSellableOnFlea(): void; +} diff --git a/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts b/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts index 281bf99..7ce39dc 100644 --- a/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts +++ b/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts @@ -1,12 +1,14 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IConfig } from "@spt/models/eft/common/IGlobals"; +import { IAdditionalHostilitySettings } from "@spt/models/eft/common/ILocationBase"; import { IInventory } from "@spt/models/eft/common/tables/IBotType"; import { Season } from "@spt/models/enums/Season"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; +import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; -import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISeasonalEventConfig"; +import { ISeasonalEvent, ISeasonalEventConfig, IZombieSettings } from "@spt/models/spt/config/ISeasonalEventConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -27,10 +29,11 @@ export declare class SeasonalEventService { protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; protected weatherConfig: IWeatherConfig; + protected locationConfig: ILocationConfig; protected halloweenEventActive?: boolean; protected christmasEventActive?: boolean; /** All events active at this point in time */ - protected currentlyActiveEvents: SeasonalEventType[]; + protected currentlyActiveEvents: ISeasonalEvent[]; constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; @@ -98,11 +101,18 @@ export declare class SeasonalEventService { */ isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** - * Handle seasonal events - * @param sessionId Players id + * Handle activating seasonal events + */ + enableSeasonalEvents(): void; + forceSeasonalEvent(eventType: SeasonalEventType): boolean; + /** + * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + /** + * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER + * @returns Season enum value + */ getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) @@ -112,11 +122,13 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in - * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(globalConfig: IConfig, event: ISeasonalEvent): void; + protected replaceBotHostility(hostilitySettings: Record): void; + protected removeEntryRequirement(locationIds: string[]): void; + givePlayerSeasonalGifts(sessionId: string): void; /** * Force zryachiy to always have a melee weapon */ @@ -125,11 +137,14 @@ export declare class SeasonalEventService { * Enable the halloween zryachiy summon event */ protected enableHalloweenSummonEvent(): void; + protected configureZombies(zombieSettings: IZombieSettings): void; + protected addEventWavesToMaps(eventType: string): void; /** * Add event bosses to maps * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + * @param mapWhitelist OPTIONAL - Maps to add bosses to */ - protected addEventBossesToMaps(eventType: SeasonalEventType): void; + protected addEventBossesToMaps(eventType: string, mapIdWhitelist?: string[]): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -148,6 +163,7 @@ export declare class SeasonalEventService { * Add pumpkin loot boxes to scavs */ protected addPumpkinsToScavBackpacks(): void; + protected renameBitcoin(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it */ @@ -156,6 +172,7 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + protected handleModEvent(event: ISeasonalEvent): void; /** * Send gift to player if they'e not already received it * @param playerId Player to send gift to diff --git a/TypeScript/9RouterHooks/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts b/TypeScript/9RouterHooks/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts new file mode 100644 index 0000000..960f8ae --- /dev/null +++ b/TypeScript/9RouterHooks/types/tools/ProductionQuestsGen/ProductionQuestsGen.d.ts @@ -0,0 +1,16 @@ +import { OnLoad } from "@spt/di/OnLoad"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { DatabaseServer } from "@spt/servers/DatabaseServer"; +export declare class ProductionQuestsGen { + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected onLoadComponents: OnLoad[]; + private questProductionOutputList; + private questProductionMap; + private blacklistedProductions; + constructor(databaseServer: DatabaseServer, logger: ILogger, onLoadComponents: OnLoad[]); + run(): Promise; + private updateProductionQuests; + private isValidQuestProduction; + private buildQuestProductionList; +} diff --git a/TypeScript/9RouterHooks/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts b/TypeScript/9RouterHooks/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts new file mode 100644 index 0000000..5663738 --- /dev/null +++ b/TypeScript/9RouterHooks/types/tools/ProductionQuestsGen/ProductionQuestsGenProgram.d.ts @@ -0,0 +1,7 @@ +import "reflect-metadata"; +import "source-map-support/register"; +export declare class ProductionQuestsGenProgram { + private errorHandler; + constructor(); + start(): Promise; +} diff --git a/TypeScript/9RouterHooks/types/utils/HttpFileUtil.d.ts b/TypeScript/9RouterHooks/types/utils/HttpFileUtil.d.ts index 57f21c8..9569f81 100644 --- a/TypeScript/9RouterHooks/types/utils/HttpFileUtil.d.ts +++ b/TypeScript/9RouterHooks/types/utils/HttpFileUtil.d.ts @@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; export declare class HttpFileUtil { protected httpServerHelper: HttpServerHelper; constructor(httpServerHelper: HttpServerHelper); - sendFile(resp: ServerResponse, filePath: string): void; + sendFileAsync(resp: ServerResponse, filePath: string): Promise; }