Updated types

This commit is contained in:
Dev 2024-11-17 17:47:25 +00:00
parent 07483af828
commit 55ec8d0db4
1736 changed files with 13776 additions and 5684 deletions

View File

@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData";
import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData";
import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; 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 { IWorkoutData } from "@spt/models/eft/health/IWorkoutData";
import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData";
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
@ -14,14 +13,6 @@ export declare class HealthCallbacks {
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected healthController: HealthController; protected healthController: HealthController;
constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, 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<string>;
/** /**
* Custom spt server request found in modules/QTEPatch.cs * Custom spt server request found in modules/QTEPatch.cs
* @param url * @param url

View File

@ -21,7 +21,7 @@ export declare class InraidCallbacks {
*/ */
registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData;
/** /**
* Handle raid/profile/save * Handle raid/profile/scavsave
* @param url * @param url
* @param info Save progress request * @param info Save progress request
* @param sessionID Session id * @param sessionID Session id

View File

@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa
import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData";
import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData";
import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; 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 { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData";
import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems";
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
@ -58,4 +59,5 @@ export declare class InventoryCallbacks {
* Handle game/profile/items/moving - QuestFail * Handle game/profile/items/moving - QuestFail
*/ */
failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
} }

View File

@ -1,5 +1,6 @@
import { MatchController } from "@spt/controllers/MatchController"; import { MatchController } from "@spt/controllers/MatchController";
import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; 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 { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData";
import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData";
import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData";
@ -53,7 +54,7 @@ export declare class MatchCallbacks {
/** Handle match/group/start_game */ /** Handle match/group/start_game */
joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData<IProfileStatusResponse>; joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData<IProfileStatusResponse>;
/** Handle client/getMetricsConfig */ /** Handle client/getMetricsConfig */
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>; getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<IMetrics>;
/** /**
* Called periodically while in a group * Called periodically while in a group
* Handle client/match/group/status * Handle client/match/group/status

View File

@ -3,7 +3,7 @@ export declare enum ContextVariableType {
SESSION_ID = 0, SESSION_ID = 0,
/** Currently acive raid information */ /** Currently acive raid information */
RAID_CONFIGURATION = 1, RAID_CONFIGURATION = 1,
/** Timestamp when client first connected */ /** SessionID + Timestamp when client first connected, has _ between values */
CLIENT_START_TIMESTAMP = 2, CLIENT_START_TIMESTAMP = 2,
/** When player is loading into map and loot is requested */ /** When player is loading into map and loot is requested */
REGISTER_PLAYER_REQUEST = 3, REGISTER_PLAYER_REQUEST = 3,

View File

@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig";
import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig";
import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; 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 { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig";
import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ILogger } from "@spt/models/spt/utils/ILogger";
import { ConfigServer } from "@spt/servers/ConfigServer"; import { ConfigServer } from "@spt/servers/ConfigServer";
@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService";
import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { OpenZoneService } from "@spt/services/OpenZoneService"; import { OpenZoneService } from "@spt/services/OpenZoneService";
import { PostDbLoadService } from "@spt/services/PostDbLoadService";
import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService";
import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService";
import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService";
@ -52,6 +50,7 @@ export declare class GameController {
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected profileFixerService: ProfileFixerService; protected profileFixerService: ProfileFixerService;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected postDbLoadService: PostDbLoadService;
protected customLocationWaveService: CustomLocationWaveService; protected customLocationWaveService: CustomLocationWaveService;
protected openZoneService: OpenZoneService; protected openZoneService: OpenZoneService;
protected seasonalEventService: SeasonalEventService; protected seasonalEventService: SeasonalEventService;
@ -64,33 +63,16 @@ export declare class GameController {
protected cloner: ICloner; protected cloner: ICloner;
protected httpConfig: IHttpConfig; protected httpConfig: IHttpConfig;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected locationConfig: ILocationConfig;
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
protected hideoutConfig: IHideoutConfig; protected hideoutConfig: IHideoutConfig;
protected pmcConfig: IPmcConfig;
protected lootConfig: ILootConfig;
protected botConfig: IBotConfig; 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; load(): void;
/** /**
* Handle client/game/start * Handle client/game/start
*/ */
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
protected migrate39xProfile(fullProfile: ISptProfile): 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 * Handle client/game/config
*/ */
@ -119,48 +101,26 @@ export declare class GameController {
* Handle singleplayer/settings/getRaidTime * Handle singleplayer/settings/getRaidTime
*/ */
getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; 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 * 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 * @param pmcProfile Player profile
*/ */
protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void;
protected setAllDbItemsAsSellableOnFlea(): void;
/** /**
* When player logs in, iterate over all active effects and reduce timer * When player logs in, iterate over all active effects and reduce timer
* @param pmcProfile Profile to adjust values for * @param pmcProfile Profile to adjust values for
*/ */
protected updateProfileHealthValues(pmcProfile: IPmcData): void; 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 * Send starting gifts to profile after x days
* @param pmcProfile Profile to add gifts to * @param pmcProfile Profile to add gifts to
*/ */
protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; 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 * Get a list of installed mods and save their details to the profile being used
* @param fullProfile Profile to add mod details to * @param fullProfile Profile to add mod details to
*/ */
protected saveActiveModsToProfile(fullProfile: ISptProfile): void; 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 * Add the logged in players name to PMC name pool
* @param pmcProfile Profile of player to get name from * @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 * @param fullProfile Profile to check for dialog in
*/ */
protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; 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; protected logProfileDetails(fullProfile: ISptProfile): void;
} }

View File

@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData";
import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData";
import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; 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 { IWorkoutData } from "@spt/models/eft/health/IWorkoutData";
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ILogger } from "@spt/models/spt/utils/ILogger";
@ -25,15 +24,6 @@ export declare class HealthController {
protected healthHelper: HealthHelper; protected healthHelper: HealthHelper;
protected cloner: ICloner; protected cloner: ICloner;
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, 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 * When healing in menu
* @param pmcData Player profile * @param pmcData Player profile

View File

@ -28,13 +28,13 @@ export declare class InraidController {
*/ */
addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void;
/** /**
* Handle raid/profile/save * Handle raid/profile/scavsave
* Save profile state to disk * Save profile state to disk
* Handles pmc/pscav * Handles pmc/pscav
* @param offraidData post-raid request data * @param offraidProfileData Post-raid scav profile data
* @param sessionID Session id * @param sessionID Session id
*/ */
savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void;
/** /**
* Get the inraid config from configs/inraid.json * Get the inraid config from configs/inraid.json
* @returns InRaid Config * @returns InRaid Config

View File

@ -176,6 +176,11 @@ export declare class InsuranceController {
* @returns void * @returns void
*/ */
protected sendMail(sessionID: string, insurance: IInsurance): 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<string, string[]>, insurance: IInsurance): void;
/** /**
* Determines whether an insured item should be removed from the player's inventory based on a random roll and * Determines whether an insured item should be removed from the player's inventory based on a random roll and
* trader-specific return chance. * trader-specific return chance.

View File

@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa
import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData";
import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData";
import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; 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 { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData";
import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems";
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; 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; openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void;
redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void;
setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, 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;
} }

View File

@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest";
import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
@ -54,13 +53,6 @@ export declare class QuestController {
* @returns array of IQuest * @returns array of IQuest
*/ */
getClientQuests(sessionID: string): 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 QuestAccept event
* Handle the client accepting a quest and starting it * Handle the client accepting a quest and starting it
@ -108,49 +100,6 @@ export declare class QuestController {
* @returns ItemEvent client response * @returns ItemEvent client response
*/ */
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; 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 * Handle QuestHandover event
* @param pmcData Player profile * @param pmcData Player profile

View File

@ -1,5 +1,5 @@
import { IncomingMessage, ServerResponse } from "node:http"; import { IncomingMessage, ServerResponse } from "node:http";
export declare class Serializer { export declare class Serializer {
serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise<void>;
canHandle(something: string): boolean; canHandle(something: string): boolean;
} }

View File

@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator {
* @returns itemHelper.getItem() result * @returns itemHelper.getItem() result
*/ */
protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; 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 * Choose a weapon mod tpl for a given slot from a pool of choices
* Checks chosen tpl is compatible with all existing weapon items * Checks chosen tpl is compatible with all existing weapon items

View File

@ -1,8 +1,10 @@
import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator";
import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator";
import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper";
import { BotHelper } from "@spt/helpers/BotHelper"; import { BotHelper } from "@spt/helpers/BotHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { 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 { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType";
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
@ -31,6 +33,7 @@ export declare class BotGenerator {
protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentFilterService: BotEquipmentFilterService;
protected weightedRandomHelper: WeightedRandomHelper; protected weightedRandomHelper: WeightedRandomHelper;
protected botHelper: BotHelper; protected botHelper: BotHelper;
protected botGeneratorHelper: BotGeneratorHelper;
protected seasonalEventService: SeasonalEventService; protected seasonalEventService: SeasonalEventService;
protected itemFilterService: ItemFilterService; protected itemFilterService: ItemFilterService;
protected botNameService: BotNameService; protected botNameService: BotNameService;
@ -38,7 +41,7 @@ export declare class BotGenerator {
protected cloner: ICloner; protected cloner: ICloner;
protected botConfig: IBotConfig; protected botConfig: IBotConfig;
protected pmcConfig: IPmcConfig; 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 * Generate a player scav bot object
* @param role e.g. assault / pmcbot * @param role e.g. assault / pmcbot
@ -48,7 +51,7 @@ export declare class BotGenerator {
*/ */
generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; 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 sessionId Session id
* @param botGenerationDetails details on how to generate bots * @param botGenerationDetails details on how to generate bots
* @returns constructed bot * @returns constructed bot
@ -76,6 +79,36 @@ export declare class BotGenerator {
* @returns IBotBase object * @returns IBotBase object
*/ */
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; 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<string, MinMax>, 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<string, number>, 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<string, number>, 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; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void;
/** /**
* Remove items from item.json/lootableItemBlacklist from bots inventory * Remove items from item.json/lootableItemBlacklist from bots inventory

View File

@ -71,14 +71,6 @@ export declare class BotLootGenerator {
* @param botRole Role of bot (pmcBEAR/pmcUSEC) * @param botRole Role of bot (pmcBEAR/pmcUSEC)
*/ */
protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; 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 * 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 * @param pool Pool of items to pick from with weight

View File

@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper";
import { PresetHelper } from "@spt/helpers/PresetHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper";
import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation";
import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; 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 { IItem } from "@spt/models/eft/common/tables/IItem";
import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig";
import { ILogger } from "@spt/models/spt/utils/ILogger"; 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 forcedSpawnPoints forced Forced loot locations that must be added
* @param locationName Name of map currently having force loot created for * @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<string, IStaticAmmoDetails[]>): void;
/** /**
* Create array of item (with child items) and return * Create array of item (with child items) and return
* @param chosenComposedKey Key we want to look up items for * @param chosenComposedKey Key we want to look up items for
@ -132,7 +132,7 @@ export declare class LocationLootGenerator {
* @param staticAmmoDist ammo distributions * @param staticAmmoDist ammo distributions
* @returns IContainerItem * @returns IContainerItem
*/ */
protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record<string, IStaticAmmoDetails[]>): IContainerItem; protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record<string, IStaticAmmoDetails[]>): IContainerItem;
/** /**
* Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon
* @param items Items array to search * @param items Items array to search

View File

@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator {
protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean;
/** /**
* Create one flea offer for a specific item * Create one flea offer for a specific item
* @param sellerId Id of seller
* @param itemWithChildren Item to create offer for * @param itemWithChildren Item to create offer for
* @param isPreset Is item a weapon preset * @param isPreset Is item a weapon preset
* @param itemDetails raw db item details * @param itemToSellDetails Raw db item details
* @returns Item array * @returns Item array
*/ */
protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise<void>; protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise<void>;
/** /**
* Generate trader offers on flea using the traders assort data * Generate trader offers on flea using the traders assort data
* @param traderID Trader to generate offers for * @param traderID Trader to generate offers for

View File

@ -66,5 +66,5 @@ export declare class WeatherGenerator {
protected getWeightedWindSpeed(): number; protected getWeightedWindSpeed(): number;
protected getWeightedFog(): number; protected getWeightedFog(): number;
protected getWeightedRain(): number; protected getWeightedRain(): number;
protected getRandomFloat(node: string): number; protected getRandomFloat(node: string, precision?: number): number;
} }

View File

@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig";
import { ConfigServer } from "@spt/servers/ConfigServer"; import { ConfigServer } from "@spt/servers/ConfigServer";
import { GiftService } from "@spt/services/GiftService"; import { GiftService } from "@spt/services/GiftService";
import { MailSendService } from "@spt/services/MailSendService"; import { MailSendService } from "@spt/services/MailSendService";
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
import { RandomUtil } from "@spt/utils/RandomUtil"; import { RandomUtil } from "@spt/utils/RandomUtil";
export declare class SptDialogueChatBot implements IDialogueChatBot { export declare class SptDialogueChatBot implements IDialogueChatBot {
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected mailSendService: MailSendService; protected mailSendService: MailSendService;
protected seasonalEventService: SeasonalEventService;
protected giftService: GiftService; protected giftService: GiftService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected weatherConfig: IWeatherConfig; 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; getChatBot(): IUserDialogInfo;
/** /**
* Send responses back to player when they communicate with SPT friend on friends list * Send responses back to player when they communicate with SPT friend on friends list

View File

@ -41,12 +41,16 @@ export declare class InRaidHelper {
*/ */
setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; 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 * Remove FiR status from items
* Only removes property if item had FiR when entering raid * @param items Items to process
* @param postRaidProfile profile to update items for
* @returns Updated profile with SpawnedInSession removed
*/ */
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 * Clear PMC inventory of all items except those that are exempt
* Used post-raid to remove items after death * Used post-raid to remove items after death

View File

@ -536,6 +536,11 @@ export declare class ItemHelper {
*/ */
getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number;
getItemBaseType(tpl: string, rootOnly?: boolean): string; 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 { declare namespace ItemHelper {
interface IItemSize { interface IItemSize {

View File

@ -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 { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest";
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData";
import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { QuestStatus } from "@spt/models/enums/QuestStatus";
import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; 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 { LocaleService } from "@spt/services/LocaleService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { MailSendService } from "@spt/services/MailSendService"; import { MailSendService } from "@spt/services/MailSendService";
import { PlayerService } from "@spt/services/PlayerService";
import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService";
import { HashUtil } from "@spt/utils/HashUtil"; import { HashUtil } from "@spt/utils/HashUtil";
import { TimeUtil } from "@spt/utils/TimeUtil"; import { TimeUtil } from "@spt/utils/TimeUtil";
@ -44,10 +46,11 @@ export declare class QuestHelper {
protected traderHelper: TraderHelper; protected traderHelper: TraderHelper;
protected presetHelper: PresetHelper; protected presetHelper: PresetHelper;
protected mailSendService: MailSendService; protected mailSendService: MailSendService;
protected playerService: PlayerService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questConfig: IQuestConfig; 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 * Get status of a quest in player profile by its id
* @param pmcData Profile to search * @param pmcData Profile to search
@ -260,6 +263,13 @@ export declare class QuestHelper {
* @returns Array of reward objects * @returns Array of reward objects
*/ */
applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; 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 * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile
* also update client response recipeUnlocked array with craft id * also update client response recipeUnlocked array with craft id
@ -302,4 +312,63 @@ export declare class QuestHelper {
* @returns Hours item will be available for * @returns Hours item will be available for
*/ */
getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; 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;
} }

View File

@ -39,7 +39,7 @@ export declare class TraderHelper {
* @param sessionID Players id * @param sessionID Players id
* @returns Trader base * @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 * Get all assort data for a particular trader
* @param traderId Trader to get assorts for * @param traderId Trader to get assorts for

View File

@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem";
export interface IGlobals { export interface IGlobals {
time: number; time: number;
config: IConfig; config: IConfig;
LocationInfection: ILocationInfection;
bot_presets: IBotPreset[]; bot_presets: IBotPreset[];
AudioSettings: IAudioSettings; AudioSettings: IAudioSettings;
EnvironmentSettings: IEnvironmentSettings; EnvironmentSettings: IEnvironmentSettings;
BotWeaponScatterings: IBotWeaponScattering[]; BotWeaponScatterings: IBotWeaponScattering[];
ItemPresets: Record<string, IPreset>; ItemPresets: Record<string, IPreset>;
} }
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 { export interface IArtilleryShelling {
ArtilleryMapsConfigs: Record<string, IArtilleryMapSettings>; ArtilleryMapsConfigs: Record<string, IArtilleryMapSettings>;
ProjectileExplosionParams: IProjectileExplosionParams; ProjectileExplosionParams: IProjectileExplosionParams;
@ -96,6 +109,7 @@ export interface IConfig {
MaxBotsAliveOnMapPvE: number; MaxBotsAliveOnMapPvE: number;
SavagePlayCooldown: number; SavagePlayCooldown: number;
SavagePlayCooldownNdaFree: number; SavagePlayCooldownNdaFree: number;
SeasonActivity: ISeasonActivity;
MarksmanAccuracy: number; MarksmanAccuracy: number;
SavagePlayCooldownDevelop: number; SavagePlayCooldownDevelop: number;
TODSkyDate: string; TODSkyDate: string;
@ -182,6 +196,14 @@ export interface IConfig {
Ballistic: IBallistic; Ballistic: IBallistic;
RepairSettings: IRepairSettings; RepairSettings: IRepairSettings;
} }
export interface ISeasonActivity {
InfectionHalloween: ISeasonActivityHalloween;
}
export interface ISeasonActivityHalloween {
DisplayUIEnabled: boolean;
Enabled: boolean;
ZombieBleedMul: number;
}
export interface IEnvironmentSetting2 { export interface IEnvironmentSetting2 {
EnvironmentUIData: IEnvironmentUIData; EnvironmentUIData: IEnvironmentUIData;
} }
@ -262,6 +284,7 @@ export interface ITransitSettings {
PercentageOfMissingEnergyRestore: number; PercentageOfMissingEnergyRestore: number;
PercentageOfMissingHealthRestore: number; PercentageOfMissingHealthRestore: number;
PercentageOfMissingWaterRestore: number; PercentageOfMissingWaterRestore: number;
RestoreHealthOnDestroyedParts: boolean;
ScavPriceMod: number; ScavPriceMod: number;
UsecPriceMod: number; UsecPriceMod: number;
active: boolean; active: boolean;
@ -634,6 +657,12 @@ export interface IEffects {
HeavyBleeding: IHeavyBleeding; HeavyBleeding: IHeavyBleeding;
LightBleeding: ILightBleeding; LightBleeding: ILightBleeding;
BodyTemperature: IBodyTemperature; BodyTemperature: IBodyTemperature;
ZombieInfection: IZombieInfection;
}
export interface IZombieInfection {
Dehydration: number;
HearingDebuffPercentage: number;
СumulativeTime: number;
} }
export interface IExistence { export interface IExistence {
EnergyLoopTime: number; EnergyLoopTime: number;
@ -1203,6 +1232,7 @@ export interface IInsurance {
CoefOfSendingMessageTime: number; CoefOfSendingMessageTime: number;
CoefOfHavingMarkOfUnknown: number; CoefOfHavingMarkOfUnknown: number;
EditionSendingMessageTime: Record<string, IMessageSendTImeMultipler>; EditionSendingMessageTime: Record<string, IMessageSendTImeMultipler>;
OnlyInDeathCase: boolean;
} }
export interface IMessageSendTImeMultipler { export interface IMessageSendTImeMultipler {
multiplier: number; multiplier: number;

View File

@ -77,6 +77,7 @@ export interface ILocationBase {
EscapeTimeLimit: number; EscapeTimeLimit: number;
EscapeTimeLimitCoop: number; EscapeTimeLimitCoop: number;
EscapeTimeLimitPVE: number; EscapeTimeLimitPVE: number;
Events: ILocationEvents;
exit_access_time: number; exit_access_time: number;
ForceOnlineRaidInPVE: boolean; ForceOnlineRaidInPVE: boolean;
exit_count: number; exit_count: number;
@ -99,6 +100,7 @@ export interface ILocationBase {
export interface ITransit { export interface ITransit {
activateAfterSec: string; activateAfterSec: string;
active: boolean; active: boolean;
name: string;
conditions: string; conditions: string;
description: string; description: string;
id: number; id: number;
@ -271,10 +273,36 @@ export interface IWave {
slots_min: number; slots_min: number;
time_max: number; time_max: number;
time_min: number; time_min: number;
/** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */
sptId?: string; sptId?: string;
ChanceGroup?: number; ChanceGroup?: number;
/** 'pve' and/or 'regular' */
SpawnMode: string[]; 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 { export declare enum WildSpawnType {
ASSAULT = "assault", ASSAULT = "assault",
MARKSMAN = "marksman", MARKSMAN = "marksman",

View File

@ -93,6 +93,7 @@ export interface IBotInfoSettings {
Experience: number; Experience: number;
StandingForKill: number; StandingForKill: number;
AggressorBonus: number; AggressorBonus: number;
UseSimpleAnimator: boolean;
} }
export interface IBan { export interface IBan {
banType: BanType; banType: BanType;
@ -218,6 +219,7 @@ export interface IVictim {
Level: number; Level: number;
Weapon: string; Weapon: string;
Role: string; Role: string;
Location: string;
} }
export interface ISessionCounters { export interface ISessionCounters {
Items: ICounterKeyValue[]; Items: ICounterKeyValue[];

View File

@ -97,10 +97,14 @@ export interface IDifficultyCategories {
Shoot: Record<string, string | number | boolean>; Shoot: Record<string, string | number | boolean>;
} }
export interface IExperience { export interface IExperience {
aggressorBonus: number; /** key = bot difficulty */
aggressorBonus: Record<string, number>;
level: MinMax; level: MinMax;
reward: MinMax; /** key = bot difficulty */
standingForKill: number; reward: Record<string, MinMax>;
/** key = bot difficulty */
standingForKill: Record<string, number>;
useSimpleAnimator: boolean;
} }
export interface IGeneration { export interface IGeneration {
items: IGenerationWeightingItems; items: IGenerationWeightingItems;

View File

@ -42,12 +42,18 @@ export interface IUpd {
SideEffect?: IUpdSideEffect; SideEffect?: IUpdSideEffect;
RepairKit?: IUpdRepairKit; RepairKit?: IUpdRepairKit;
CultistAmulet?: IUpdCultistAmulet; CultistAmulet?: IUpdCultistAmulet;
PinLockState?: PinLockState;
}
export declare enum PinLockState {
FREE = "Free",
LOCKED = "Locked",
PINNED = "Pinned"
} }
export interface IUpdBuff { export interface IUpdBuff {
rarity: string; Rarity: string;
buffType: string; BuffType: string;
value: number; Value: number;
thresholdDurability?: number; ThresholdDurability?: number;
} }
export interface IUpdTogglable { export interface IUpdTogglable {
On: boolean; On: boolean;

View File

@ -88,18 +88,23 @@ export interface IBarterScheme {
} }
export interface ISuit { export interface ISuit {
_id: string; _id: string;
externalObtain: boolean;
internalObtain: boolean;
isHiddenInPVE: boolean;
tid: string; tid: string;
suiteId: string; suiteId: string;
isActive: boolean; isActive: boolean;
requirements: ISuitRequirements; requirements: ISuitRequirements;
} }
export interface ISuitRequirements { export interface ISuitRequirements {
achievementRequirements: string[];
loyaltyLevel: number; loyaltyLevel: number;
profileLevel: number; profileLevel: number;
standing: number; standing: number;
skillRequirements: string[]; skillRequirements: string[];
questRequirements: string[]; questRequirements: string[];
itemRequirements: ItemRequirement[]; itemRequirements: ItemRequirement[];
requiredTid: string;
} }
export interface ItemRequirement { export interface ItemRequirement {
count: number; count: number;

View File

@ -17,6 +17,7 @@ export interface IHideoutProduction {
continuous: boolean; continuous: boolean;
count: number; count: number;
productionLimitCount: number; productionLimitCount: number;
isCodeProduction: boolean;
} }
export interface IRequirement extends IRequirementBase { export interface IRequirement extends IRequirementBase {
templateId?: string; templateId?: string;

View File

@ -1,4 +1,3 @@
import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData";
export interface IScavSaveRequestData { export interface IScavSaveRequestData extends IPostRaidPmcData {
profile: IPostRaidPmcData;
} }

View File

@ -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;
}

View File

@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData {
} }
export interface IEndRaidResult { export interface IEndRaidResult {
profile: IPmcData; profile: IPmcData;
/** "Survived/Transit etc" */ /** "Survived/Transit" etc */
result: string; result: ExitStatus;
ExitStatus: ExitStatus;
killerId: string; killerId: string;
killerAid: string; killerAid: string;
/** "Gate 3" etc */
exitName: string; exitName: string;
inSession: boolean; inSession: boolean;
favorite: boolean; favorite: boolean;
/** Seconds in raid */
playTime: number; playTime: number;
} }
export interface ILocationTransit { export interface ILocationTransit {
@ -33,6 +34,8 @@ export interface ILocationTransit {
raidMode: string; raidMode: string;
side: string; side: string;
dayTime: string; dayTime: string;
/** The location player last visited */
sptLastVisitedLocation: string;
} }
export interface ITransitProfile { export interface ITransitProfile {
_id: string; _id: string;

View File

@ -1,7 +1,8 @@
export declare enum ExitStatus { export declare enum ExitStatus {
SURVIVED = 0, SURVIVED = "Survived",
KILLED = 1, KILLED = "Killed",
LEFT = 2, LEFT = "Left",
RUNNER = 3, RUNNER = "Runner",
MISSINGINACTION = 4 MISSINGINACTION = "MissingInAction",
TRANSIT = "Transit"
} }

View File

@ -25,5 +25,6 @@ export declare enum ItemEventActions {
REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild",
REDEEM_PROFILE_REWARD = "RedeemProfileReward", REDEEM_PROFILE_REWARD = "RedeemProfileReward",
SET_FAVORITE_ITEMS = "SetFavoriteItems", SET_FAVORITE_ITEMS = "SetFavoriteItems",
QUEST_FAIL = "QuestFail" QUEST_FAIL = "QuestFail",
PIN_LOCK = "PinLock"
} }

View File

@ -3,5 +3,7 @@ export declare enum Season {
AUTUMN = 1, AUTUMN = 1,
WINTER = 2, WINTER = 2,
SPRING = 3, SPRING = 3,
STORM = 4 AUTUMN_LATE = 4,
SPRING_EARLY = 5,
STORM = 6
} }

View File

@ -4,5 +4,5 @@ export declare enum SeasonalEventType {
HALLOWEEN = "Halloween", HALLOWEEN = "Halloween",
NEW_YEARS = "NewYears", NEW_YEARS = "NewYears",
PROMO = "Promo", PROMO = "Promo",
SNOW = "Snow" APRIL_FOOLS = "AprilFools"
} }

View File

@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber {
SKIER = 53, SKIER = 53,
SECTANTPREDVESTNIK = 57, SECTANTPREDVESTNIK = 57,
SECTANTPRIZRAK = 58, SECTANTPRIZRAK = 58,
SECTANTONI = 59 SECTANTONI = 59,
INFECTEDASSAULT = 60,
INFECTEDPMC = 61,
INFECTEDCIVIL = 62,
INFECTEDLABORANT = 63,
INFECTEDTAGILLA = 64
} }

View File

@ -2,12 +2,13 @@ import { IItem } from "@spt/models/eft/common/tables/IItem";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { ModSpawn } from "@spt/models/enums/ModSpawn";
import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; 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 { export interface IModToSpawnRequest {
/** Slot mod will fit into */ /** Slot mod will fit into */
modSlot: string; modSlot: string;
/** Will generate a randomised mod pool if true */ /** Will generate a randomised mod pool if true */
isRandomisableSlot: boolean; isRandomisableSlot: boolean;
randomisationSettings: IRandomisationDetails;
/** Parent slot the item will be a part of */ /** Parent slot the item will be a part of */
botWeaponSightWhitelist: Record<string, string[]>; botWeaponSightWhitelist: Record<string, string[]>;
/** Blacklist to prevent mods from being picked */ /** Blacklist to prevent mods from being picked */

View File

@ -160,6 +160,8 @@ export interface IRandomisationDetails {
/** Equipment mod chances */ /** Equipment mod chances */
equipmentMods?: Record<string, number>; equipmentMods?: Record<string, number>;
nighttimeChanges?: INighttimeChanges; nighttimeChanges?: INighttimeChanges;
/** Key = weapon tpl, value = min size of magaizne allowed */
minimumMagazineSize?: Record<string, number>;
} }
export interface INighttimeChanges { export interface INighttimeChanges {
/** Applies changes to values stored in equipmentMods */ /** Applies changes to values stored in equipmentMods */
@ -169,9 +171,11 @@ export interface IEquipmentFilterDetails {
/** Between what levels do these equipment filter setting apply to */ /** Between what levels do these equipment filter setting apply to */
levelRange: MinMax; levelRange: MinMax;
/** Key: mod slot name e.g. mod_magazine, value: item tpls */ /** Key: mod slot name e.g. mod_magazine, value: item tpls */
equipment: Record<string, string[]>; equipment?: Record<string, string[]>;
/** Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls */
gear?: Record<string, string[]>;
/** Key: cartridge type e.g. Caliber23x75, value: item tpls */ /** Key: cartridge type e.g. Caliber23x75, value: item tpls */
cartridge: Record<string, string[]>; cartridge?: Record<string, string[]>;
} }
export interface IWeightingAdjustmentDetails { export interface IWeightingAdjustmentDetails {
/** Between what levels do these weight settings apply to */ /** Between what levels do these weight settings apply to */

View File

@ -71,6 +71,7 @@ export interface IChatbotFeatures {
commandoEnabled: boolean; commandoEnabled: boolean;
commandoFeatures: ICommandoFeatures; commandoFeatures: ICommandoFeatures;
commandUseLimits: Record<string, number>; commandUseLimits: Record<string, number>;
ids: Record<string, string>;
} }
export interface ICommandoFeatures { export interface ICommandoFeatures {
giveCommandEnabled: boolean; giveCommandEnabled: boolean;

View File

@ -7,8 +7,10 @@ export interface IInsuranceConfig extends IBaseConfig {
blacklistedEquipment: string[]; blacklistedEquipment: string[];
/** Some slots should always be removed, e.g. 'cartridges' */ /** Some slots should always be removed, e.g. 'cartridges' */
slotIdsToAlwaysRemove: string[]; 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; 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 */ /** How often server should process insurance in seconds */
runIntervalSeconds: number; runIntervalSeconds: number;
minAttachmentRoublePriceToBeTaken: number; minAttachmentRoublePriceToBeTaken: number;

View File

@ -9,5 +9,11 @@ export interface IItemConfig extends IBaseConfig {
rewardItemBlacklist: string[]; rewardItemBlacklist: string[];
/** Items that can only be found on bosses */ /** Items that can only be found on bosses */
bossItems: string[]; bossItems: string[];
handbookPriceOverride: Record<string, number>; handbookPriceOverride: Record<string, IHandbookPriceOverride>;
}
export interface IHandbookPriceOverride {
/** Price in roubles */
price: number;
/** NOT parentId from items.json, but handbook.json */
parentId: string;
} }

View File

@ -3,8 +3,6 @@ import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase"
import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig";
export interface ILocationConfig extends IBaseConfig { export interface ILocationConfig extends IBaseConfig {
kind: "spt-location"; 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 */ /** 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; 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 */ /** 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; scavRaidTimeSettings: IScavRaidTimeSettings;
/** Settings to adjust mods for lootable equipment in raid */ /** Settings to adjust mods for lootable equipment in raid */
equipmentLootSettings: IEquipmentLootSettings; 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 { export interface IEquipmentLootSettings {
modSpawnChancePercent: Record<string, number>; modSpawnChancePercent: Record<string, number>;

View File

@ -15,7 +15,7 @@ export interface IQuestConfig extends IBaseConfig {
usecOnlyQuests: string[]; usecOnlyQuests: string[];
/** Quests that the keyed game version do not see/access */ /** Quests that the keyed game version do not see/access */
profileBlacklist: Record<string, string[]>; profileBlacklist: Record<string, string[]>;
/** Quests that only the keyed game version can see/access */ /** key=questid, gameversions that can see/access quest */
profileWhitelist: Record<string, string[]>; profileWhitelist: Record<string, string[]>;
} }
export interface IPlayerTypeQuestIds { export interface IPlayerTypeQuestIds {

View File

@ -50,6 +50,8 @@ export interface IDynamic {
priceRanges: IPriceRanges; priceRanges: IPriceRanges;
/** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */
showDefaultPresetsOnly: boolean; 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; endTimeSeconds: MinMax;
/** Settings to control the durability range of item items listed on flea */ /** Settings to control the durability range of item items listed on flea */
condition: Condition; condition: Condition;
@ -90,6 +92,8 @@ export interface IBarterDetails {
priceRangeVariancePercent: number; priceRangeVariancePercent: number;
/** Min rouble price for an offer to be considered for turning into a barter */ /** Min rouble price for an offer to be considered for turning into a barter */
minRoubleCostToBecomeBarter: number; minRoubleCostToBecomeBarter: number;
/** Should barter offers only single stack */
makeSingleStackOnly: boolean;
/** Item Tpls to never be turned into a barter */ /** Item Tpls to never be turned into a barter */
itemTypeBlacklist: string[]; itemTypeBlacklist: string[];
} }

View File

@ -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 { SeasonalEventType } from "@spt/models/enums/SeasonalEventType";
import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig";
export interface ISeasonalEventConfig extends IBaseConfig { export interface ISeasonalEventConfig extends IBaseConfig {
@ -9,15 +9,26 @@ export interface ISeasonalEventConfig extends IBaseConfig {
events: ISeasonalEvent[]; events: ISeasonalEvent[];
eventBotMapping: Record<string, string>; eventBotMapping: Record<string, string>;
eventBossSpawns: Record<string, Record<string, IBossLocationSpawn[]>>; eventBossSpawns: Record<string, Record<string, IBossLocationSpawn[]>>;
eventWaves: Record<string, Record<string, IWave[]>>;
gifterSettings: IGifterSetting[]; gifterSettings: IGifterSetting[];
/** key = event, second key = map name */
hostilitySettingsForEvent: Record<string, Record<string, IAdditionalHostilitySettings[]>>;
} }
export interface ISeasonalEvent { export interface ISeasonalEvent {
enabled: boolean;
name: string; name: string;
type: SeasonalEventType; type: SeasonalEventType;
startDay: number; startDay: number;
startMonth: number; startMonth: number;
endDay: number; endDay: number;
endMonth: number; endMonth: number;
settings?: Record<string, any>;
}
export interface IZombieSettings {
enabled: boolean;
mapInfectionAmount: Record<string, number>;
disableBosses: string[];
disableWaves: string[];
} }
export interface IGifterSetting { export interface IGifterSetting {
map: string; map: string;

View File

@ -47,6 +47,10 @@ export interface IFenceConfig {
blacklist: string[]; blacklist: string[];
coopExtractGift: ICoopExtractReward; coopExtractGift: ICoopExtractReward;
btrDeliveryExpireHours: number; 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 { export interface IItemDurabilityCurrentMax {
current: MinMax; current: MinMax;

View File

@ -8,6 +8,6 @@ export declare class ImageRouter {
protected httpFileUtil: HttpFileUtil; protected httpFileUtil: HttpFileUtil;
constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil); constructor(vfs: VFS, imageRouteService: ImageRouteService, httpFileUtil: HttpFileUtil);
addRoute(key: string, valueToAdd: string): void; 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<void>;
getImage(): string; getImage(): string;
} }

View File

@ -8,6 +8,6 @@ export declare class BundleSerializer extends Serializer {
protected bundleLoader: BundleLoader; protected bundleLoader: BundleLoader;
protected httpFileUtil: HttpFileUtil; protected httpFileUtil: HttpFileUtil;
constructor(logger: ILogger, bundleLoader: BundleLoader, 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<void>;
canHandle(route: string): boolean; canHandle(route: string): boolean;
} }

View File

@ -4,6 +4,6 @@ import { ImageRouter } from "@spt/routers/ImageRouter";
export declare class ImageSerializer extends Serializer { export declare class ImageSerializer extends Serializer {
protected imageRouter: ImageRouter; protected imageRouter: ImageRouter;
constructor(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<void>;
canHandle(route: string): boolean; canHandle(route: string): boolean;
} }

View File

@ -8,6 +8,6 @@ export declare class NotifySerializer extends Serializer {
protected jsonUtil: JsonUtil; protected jsonUtil: JsonUtil;
protected httpServerHelper: HttpServerHelper; protected httpServerHelper: HttpServerHelper;
constructor(notifierController: NotifierController, jsonUtil: JsonUtil, 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<void>;
canHandle(route: string): boolean; canHandle(route: string): boolean;
} }

View File

@ -26,7 +26,7 @@ export declare class SptHttpListener implements IHttpListener {
* @param body Buffer * @param body Buffer
* @param output Server generated response data * @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<void>;
/** /**
* Is request flagged as debug enabled * Is request flagged as debug enabled
* @param req Incoming request * @param req Incoming request
@ -42,5 +42,5 @@ export declare class SptHttpListener implements IHttpListener {
getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise<string>; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise<string>;
protected getBodyInfo(body: Buffer, requestUrl?: any): any; protected getBodyInfo(body: Buffer, requestUrl?: any): any;
sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendJson(resp: ServerResponse, output: string, sessionID: string): void;
sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): Promise<void>;
} }

View File

@ -70,6 +70,7 @@ export declare class InsuranceService {
* @returns void * @returns void
*/ */
protected adoptOrphanedInsEquipment(sessionID: string): 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 * 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() * @param equipmentPkg Gear to store - generated by getGearLostInRaid()

View File

@ -5,6 +5,7 @@ import { PlayerScavGenerator } from "@spt/generators/PlayerScavGenerator";
import { HealthHelper } from "@spt/helpers/HealthHelper"; import { HealthHelper } from "@spt/helpers/HealthHelper";
import { InRaidHelper } from "@spt/helpers/InRaidHelper"; import { InRaidHelper } from "@spt/helpers/InRaidHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; import { ILocationBase } from "@spt/models/eft/common/ILocationBase";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
@ -46,6 +47,7 @@ export declare class LocationLifecycleService {
protected databaseService: DatabaseService; protected databaseService: DatabaseService;
protected inRaidHelper: InRaidHelper; protected inRaidHelper: InRaidHelper;
protected healthHelper: HealthHelper; protected healthHelper: HealthHelper;
protected questHelper: QuestHelper;
protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
protected pmcChatResponseService: PmcChatResponseService; protected pmcChatResponseService: PmcChatResponseService;
protected playerScavGenerator: PlayerScavGenerator; protected playerScavGenerator: PlayerScavGenerator;
@ -68,7 +70,7 @@ export declare class LocationLifecycleService {
protected hideoutConfig: IHideoutConfig; protected hideoutConfig: IHideoutConfig;
protected locationConfig: ILocationConfig; protected locationConfig: ILocationConfig;
protected pmcConfig: IPmcConfig; 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 */ /** Handle client/match/local/start */
startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData; startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData;
/** /**
@ -139,10 +141,21 @@ export declare class LocationLifecycleService {
* @param locationName * @param locationName
*/ */
protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; 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 * 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 * 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 * @returns IQuestStatus
*/ */
protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[]; protected processPostRaidQuests(questsToProcess: IQuestStatus[]): IQuestStatus[];

View File

@ -60,8 +60,9 @@ export declare class PaymentService {
*/ */
addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): void; 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 * Get all money stacks in inventory and prioritise items in stash
* @param pmcData * @param pmcData Player profile
* @param currencyTpl * @param currencyTpl
* @param playerStashId Players stash id * @param playerStashId Players stash id
* @returns Sorting money items * @returns Sorting money items

View File

@ -8,6 +8,7 @@ import { IPmcChatResponse } from "@spt/models/spt/config/IPmChatResponse";
import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ILogger } from "@spt/models/spt/utils/ILogger";
import { ConfigServer } from "@spt/servers/ConfigServer"; import { ConfigServer } from "@spt/servers/ConfigServer";
import { GiftService } from "@spt/services/GiftService"; import { GiftService } from "@spt/services/GiftService";
import { LocaleService } from "@spt/services/LocaleService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService"; import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService";
import { HashUtil } from "@spt/utils/HashUtil"; import { HashUtil } from "@spt/utils/HashUtil";
@ -19,12 +20,13 @@ export declare class PmcChatResponseService {
protected notificationSendHelper: NotificationSendHelper; protected notificationSendHelper: NotificationSendHelper;
protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected localeService: LocaleService;
protected giftService: GiftService; protected giftService: GiftService;
protected weightedRandomHelper: WeightedRandomHelper; protected weightedRandomHelper: WeightedRandomHelper;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected pmcResponsesConfig: IPmcChatResponse; protected pmcResponsesConfig: IPmcChatResponse;
protected giftConfig: IGiftsConfig; 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 * 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 * @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) * 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 isVictim Is the message coming from a bot killed by the player
* @param pmcData Player profile * @param pmcData Player profile
* @param victimData OPTIMAL - details of the pmc killed
* @returns Message from PMC to player * @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 * Should capitalisation be stripped from the message response before sending
* @param isVictim Was responder a victim of player * @param isVictim Was responder a victim of player
@ -63,7 +73,7 @@ export declare class PmcChatResponseService {
* @param isVictim Was responder a victim of player * @param isVictim Was responder a victim of player
* @returns true = should be stripped * @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 * Choose a type of response based on the weightings in pmc response config
* @param isVictim Was responder killed by player * @param isVictim Was responder killed by player

View File

@ -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;
}

View File

@ -1,12 +1,14 @@
import { BotHelper } from "@spt/helpers/BotHelper"; import { BotHelper } from "@spt/helpers/BotHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { IConfig } from "@spt/models/eft/common/IGlobals"; 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 { IInventory } from "@spt/models/eft/common/tables/IBotType";
import { Season } from "@spt/models/enums/Season"; import { Season } from "@spt/models/enums/Season";
import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType";
import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; 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 { 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 { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig";
import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ILogger } from "@spt/models/spt/utils/ILogger";
import { ConfigServer } from "@spt/servers/ConfigServer"; import { ConfigServer } from "@spt/servers/ConfigServer";
@ -27,10 +29,11 @@ export declare class SeasonalEventService {
protected questConfig: IQuestConfig; protected questConfig: IQuestConfig;
protected httpConfig: IHttpConfig; protected httpConfig: IHttpConfig;
protected weatherConfig: IWeatherConfig; protected weatherConfig: IWeatherConfig;
protected locationConfig: ILocationConfig;
protected halloweenEventActive?: boolean; protected halloweenEventActive?: boolean;
protected christmasEventActive?: boolean; protected christmasEventActive?: boolean;
/** All events active at this point in time */ /** 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); constructor(logger: ILogger, databaseService: DatabaseService, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer);
protected get christmasEventItems(): string[]; protected get christmasEventItems(): string[];
protected get halloweenEventItems(): string[]; protected get halloweenEventItems(): string[];
@ -98,11 +101,18 @@ export declare class SeasonalEventService {
*/ */
isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean;
/** /**
* Handle seasonal events * Handle activating seasonal events
* @param sessionId Players id */
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; protected cacheActiveEvents(): void;
/**
* Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER
* @returns Season enum value
*/
getActiveWeatherSeason(): Season; getActiveWeatherSeason(): Season;
/** /**
* Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * 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; removeChristmasItemsFromBotInventory(botInventory: IInventory, botRole: string): void;
/** /**
* Make adjusted to server code based on the name of the event passed in * Make adjusted to server code based on the name of the event passed in
* @param sessionId Player id
* @param globalConfig globals.json * @param globalConfig globals.json
* @param eventName Name of the event to enable. e.g. Christmas * @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<string, IAdditionalHostilitySettings[]>): void;
protected removeEntryRequirement(locationIds: string[]): void;
givePlayerSeasonalGifts(sessionId: string): void;
/** /**
* Force zryachiy to always have a melee weapon * Force zryachiy to always have a melee weapon
*/ */
@ -125,11 +137,14 @@ export declare class SeasonalEventService {
* Enable the halloween zryachiy summon event * Enable the halloween zryachiy summon event
*/ */
protected enableHalloweenSummonEvent(): void; protected enableHalloweenSummonEvent(): void;
protected configureZombies(zombieSettings: IZombieSettings): void;
protected addEventWavesToMaps(eventType: string): void;
/** /**
* Add event bosses to maps * Add event bosses to maps
* @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS * @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) * Change trader icons to be more event themed (Halloween only so far)
* @param eventType What event is active * @param eventType What event is active
@ -148,6 +163,7 @@ export declare class SeasonalEventService {
* Add pumpkin loot boxes to scavs * Add pumpkin loot boxes to scavs
*/ */
protected addPumpkinsToScavBackpacks(): void; protected addPumpkinsToScavBackpacks(): void;
protected renameBitcoin(): void;
/** /**
* Set Khorovod(dancing tree) chance to 100% on all maps that support it * 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 * Add santa to maps
*/ */
protected addGifterBotToMaps(): void; protected addGifterBotToMaps(): void;
protected handleModEvent(event: ISeasonalEvent): void;
/** /**
* Send gift to player if they'e not already received it * Send gift to player if they'e not already received it
* @param playerId Player to send gift to * @param playerId Player to send gift to

View File

@ -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<void>;
private updateProductionQuests;
private isValidQuestProduction;
private buildQuestProductionList;
}

View File

@ -0,0 +1,7 @@
import "reflect-metadata";
import "source-map-support/register";
export declare class ProductionQuestsGenProgram {
private errorHandler;
constructor();
start(): Promise<void>;
}

View File

@ -3,5 +3,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper";
export declare class HttpFileUtil { export declare class HttpFileUtil {
protected httpServerHelper: HttpServerHelper; protected httpServerHelper: HttpServerHelper;
constructor(httpServerHelper: HttpServerHelper); constructor(httpServerHelper: HttpServerHelper);
sendFile(resp: ServerResponse, filePath: string): void; sendFileAsync(resp: ServerResponse, filePath: string): Promise<void>;
} }

View File

@ -4,7 +4,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData";
import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData";
import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; 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 { IWorkoutData } from "@spt/models/eft/health/IWorkoutData";
import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData";
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
@ -14,14 +13,6 @@ export declare class HealthCallbacks {
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected healthController: HealthController; protected healthController: HealthController;
constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, 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<string>;
/** /**
* Custom spt server request found in modules/QTEPatch.cs * Custom spt server request found in modules/QTEPatch.cs
* @param url * @param url

View File

@ -21,7 +21,7 @@ export declare class InraidCallbacks {
*/ */
registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData;
/** /**
* Handle raid/profile/save * Handle raid/profile/scavsave
* @param url * @param url
* @param info Save progress request * @param info Save progress request
* @param sessionID Session id * @param sessionID Session id

View File

@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa
import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData";
import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData";
import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; 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 { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData";
import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems";
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
@ -58,4 +59,5 @@ export declare class InventoryCallbacks {
* Handle game/profile/items/moving - QuestFail * Handle game/profile/items/moving - QuestFail
*/ */
failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
pinOrLock(pmcData: IPmcData, request: IPinOrLockItemRequest, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
} }

View File

@ -1,5 +1,6 @@
import { MatchController } from "@spt/controllers/MatchController"; import { MatchController } from "@spt/controllers/MatchController";
import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; 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 { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData";
import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData";
import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData"; import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData";
@ -53,7 +54,7 @@ export declare class MatchCallbacks {
/** Handle match/group/start_game */ /** Handle match/group/start_game */
joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData<IProfileStatusResponse>; joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData<IProfileStatusResponse>;
/** Handle client/getMetricsConfig */ /** Handle client/getMetricsConfig */
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>; getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<IMetrics>;
/** /**
* Called periodically while in a group * Called periodically while in a group
* Handle client/match/group/status * Handle client/match/group/status

View File

@ -3,7 +3,7 @@ export declare enum ContextVariableType {
SESSION_ID = 0, SESSION_ID = 0,
/** Currently acive raid information */ /** Currently acive raid information */
RAID_CONFIGURATION = 1, RAID_CONFIGURATION = 1,
/** Timestamp when client first connected */ /** SessionID + Timestamp when client first connected, has _ between values */
CLIENT_START_TIMESTAMP = 2, CLIENT_START_TIMESTAMP = 2,
/** When player is loading into map and loot is requested */ /** When player is loading into map and loot is requested */
REGISTER_PLAYER_REQUEST = 3, REGISTER_PLAYER_REQUEST = 3,

View File

@ -19,9 +19,6 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig";
import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig";
import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig"; 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 { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig";
import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ILogger } from "@spt/models/spt/utils/ILogger";
import { ConfigServer } from "@spt/servers/ConfigServer"; import { ConfigServer } from "@spt/servers/ConfigServer";
@ -31,6 +28,7 @@ import { GiftService } from "@spt/services/GiftService";
import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { OpenZoneService } from "@spt/services/OpenZoneService"; import { OpenZoneService } from "@spt/services/OpenZoneService";
import { PostDbLoadService } from "@spt/services/PostDbLoadService";
import { ProfileActivityService } from "@spt/services/ProfileActivityService"; import { ProfileActivityService } from "@spt/services/ProfileActivityService";
import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService";
import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService";
@ -52,6 +50,7 @@ export declare class GameController {
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected profileFixerService: ProfileFixerService; protected profileFixerService: ProfileFixerService;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected postDbLoadService: PostDbLoadService;
protected customLocationWaveService: CustomLocationWaveService; protected customLocationWaveService: CustomLocationWaveService;
protected openZoneService: OpenZoneService; protected openZoneService: OpenZoneService;
protected seasonalEventService: SeasonalEventService; protected seasonalEventService: SeasonalEventService;
@ -64,33 +63,16 @@ export declare class GameController {
protected cloner: ICloner; protected cloner: ICloner;
protected httpConfig: IHttpConfig; protected httpConfig: IHttpConfig;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected locationConfig: ILocationConfig;
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
protected hideoutConfig: IHideoutConfig; protected hideoutConfig: IHideoutConfig;
protected pmcConfig: IPmcConfig;
protected lootConfig: ILootConfig;
protected botConfig: IBotConfig; 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; load(): void;
/** /**
* Handle client/game/start * Handle client/game/start
*/ */
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
protected migrate39xProfile(fullProfile: ISptProfile): 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 * Handle client/game/config
*/ */
@ -119,48 +101,26 @@ export declare class GameController {
* Handle singleplayer/settings/getRaidTime * Handle singleplayer/settings/getRaidTime
*/ */
getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse; 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 * 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 * @param pmcProfile Player profile
*/ */
protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void; protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void;
protected setAllDbItemsAsSellableOnFlea(): void;
/** /**
* When player logs in, iterate over all active effects and reduce timer * When player logs in, iterate over all active effects and reduce timer
* @param pmcProfile Profile to adjust values for * @param pmcProfile Profile to adjust values for
*/ */
protected updateProfileHealthValues(pmcProfile: IPmcData): void; 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 * Send starting gifts to profile after x days
* @param pmcProfile Profile to add gifts to * @param pmcProfile Profile to add gifts to
*/ */
protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; 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 * Get a list of installed mods and save their details to the profile being used
* @param fullProfile Profile to add mod details to * @param fullProfile Profile to add mod details to
*/ */
protected saveActiveModsToProfile(fullProfile: ISptProfile): void; 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 * Add the logged in players name to PMC name pool
* @param pmcProfile Profile of player to get name from * @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 * @param fullProfile Profile to check for dialog in
*/ */
protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; 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; protected logProfileDetails(fullProfile: ISptProfile): void;
} }

View File

@ -5,7 +5,6 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData"; import { IHealthTreatmentRequestData } from "@spt/models/eft/health/IHealthTreatmentRequestData";
import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData"; import { IOffraidEatRequestData } from "@spt/models/eft/health/IOffraidEatRequestData";
import { IOffraidHealRequestData } from "@spt/models/eft/health/IOffraidHealRequestData"; 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 { IWorkoutData } from "@spt/models/eft/health/IWorkoutData";
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ILogger } from "@spt/models/spt/utils/ILogger";
@ -25,15 +24,6 @@ export declare class HealthController {
protected healthHelper: HealthHelper; protected healthHelper: HealthHelper;
protected cloner: ICloner; protected cloner: ICloner;
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, 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 * When healing in menu
* @param pmcData Player profile * @param pmcData Player profile

View File

@ -28,13 +28,13 @@ export declare class InraidController {
*/ */
addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void;
/** /**
* Handle raid/profile/save * Handle raid/profile/scavsave
* Save profile state to disk * Save profile state to disk
* Handles pmc/pscav * Handles pmc/pscav
* @param offraidData post-raid request data * @param offraidProfileData Post-raid scav profile data
* @param sessionID Session id * @param sessionID Session id
*/ */
savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void; savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void;
/** /**
* Get the inraid config from configs/inraid.json * Get the inraid config from configs/inraid.json
* @returns InRaid Config * @returns InRaid Config

View File

@ -176,6 +176,11 @@ export declare class InsuranceController {
* @returns void * @returns void
*/ */
protected sendMail(sessionID: string, insurance: IInsurance): 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<string, string[]>, insurance: IInsurance): void;
/** /**
* Determines whether an insured item should be removed from the player's inventory based on a random roll and * Determines whether an insured item should be removed from the player's inventory based on a random roll and
* trader-specific return chance. * trader-specific return chance.

View File

@ -25,6 +25,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa
import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData"; import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData";
import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData";
import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData"; 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 { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData";
import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems"; import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems";
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; 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; openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void;
redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void; redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void;
setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, 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;
} }

View File

@ -5,7 +5,6 @@ import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IQuestStatus } from "@spt/models/eft/common/tables/IBotBase";
import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest";
import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
@ -54,13 +53,6 @@ export declare class QuestController {
* @returns array of IQuest * @returns array of IQuest
*/ */
getClientQuests(sessionID: string): 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 QuestAccept event
* Handle the client accepting a quest and starting it * Handle the client accepting a quest and starting it
@ -108,49 +100,6 @@ export declare class QuestController {
* @returns ItemEvent client response * @returns ItemEvent client response
*/ */
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; 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 * Handle QuestHandover event
* @param pmcData Player profile * @param pmcData Player profile

View File

@ -1,5 +1,5 @@
import { IncomingMessage, ServerResponse } from "node:http"; import { IncomingMessage, ServerResponse } from "node:http";
export declare class Serializer { export declare class Serializer {
serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void; serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): Promise<void>;
canHandle(something: string): boolean; canHandle(something: string): boolean;
} }

View File

@ -139,6 +139,13 @@ export declare class BotEquipmentModGenerator {
* @returns itemHelper.getItem() result * @returns itemHelper.getItem() result
*/ */
protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined; 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 * Choose a weapon mod tpl for a given slot from a pool of choices
* Checks chosen tpl is compatible with all existing weapon items * Checks chosen tpl is compatible with all existing weapon items

View File

@ -1,8 +1,10 @@
import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator"; import { BotInventoryGenerator } from "@spt/generators/BotInventoryGenerator";
import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator"; import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator";
import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper";
import { BotHelper } from "@spt/helpers/BotHelper"; import { BotHelper } from "@spt/helpers/BotHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { 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 { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType";
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
@ -31,6 +33,7 @@ export declare class BotGenerator {
protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentFilterService: BotEquipmentFilterService;
protected weightedRandomHelper: WeightedRandomHelper; protected weightedRandomHelper: WeightedRandomHelper;
protected botHelper: BotHelper; protected botHelper: BotHelper;
protected botGeneratorHelper: BotGeneratorHelper;
protected seasonalEventService: SeasonalEventService; protected seasonalEventService: SeasonalEventService;
protected itemFilterService: ItemFilterService; protected itemFilterService: ItemFilterService;
protected botNameService: BotNameService; protected botNameService: BotNameService;
@ -38,7 +41,7 @@ export declare class BotGenerator {
protected cloner: ICloner; protected cloner: ICloner;
protected botConfig: IBotConfig; protected botConfig: IBotConfig;
protected pmcConfig: IPmcConfig; 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 * Generate a player scav bot object
* @param role e.g. assault / pmcbot * @param role e.g. assault / pmcbot
@ -48,7 +51,7 @@ export declare class BotGenerator {
*/ */
generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; 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 sessionId Session id
* @param botGenerationDetails details on how to generate bots * @param botGenerationDetails details on how to generate bots
* @returns constructed bot * @returns constructed bot
@ -76,6 +79,36 @@ export declare class BotGenerator {
* @returns IBotBase object * @returns IBotBase object
*/ */
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; 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<string, MinMax>, 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<string, number>, 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<string, number>, 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; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void;
/** /**
* Remove items from item.json/lootableItemBlacklist from bots inventory * Remove items from item.json/lootableItemBlacklist from bots inventory

View File

@ -71,14 +71,6 @@ export declare class BotLootGenerator {
* @param botRole Role of bot (pmcBEAR/pmcUSEC) * @param botRole Role of bot (pmcBEAR/pmcUSEC)
*/ */
protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; 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 * 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 * @param pool Pool of items to pick from with weight

View File

@ -3,7 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper";
import { PresetHelper } from "@spt/helpers/PresetHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper";
import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation"; import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt/models/eft/common/ILocation";
import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; 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 { IItem } from "@spt/models/eft/common/tables/IItem";
import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig";
import { ILogger } from "@spt/models/spt/utils/ILogger"; 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 forcedSpawnPoints forced Forced loot locations that must be added
* @param locationName Name of map currently having force loot created for * @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<string, IStaticAmmoDetails[]>): void;
/** /**
* Create array of item (with child items) and return * Create array of item (with child items) and return
* @param chosenComposedKey Key we want to look up items for * @param chosenComposedKey Key we want to look up items for
@ -132,7 +132,7 @@ export declare class LocationLootGenerator {
* @param staticAmmoDist ammo distributions * @param staticAmmoDist ammo distributions
* @returns IContainerItem * @returns IContainerItem
*/ */
protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: ISpawnpoint, staticAmmoDist: Record<string, IStaticAmmoDetails[]>): IContainerItem; protected createDynamicLootItem(chosenComposedKey: string, items: IItem[], staticAmmoDist: Record<string, IStaticAmmoDetails[]>): IContainerItem;
/** /**
* Find an item in array by its _tpl, handle differently if chosenTpl is a weapon * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon
* @param items Items array to search * @param items Items array to search

View File

@ -149,12 +149,13 @@ export declare class RagfairOfferGenerator {
protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean; protected removeBannedPlatesFromPreset(presetWithChildren: IItem[], plateSettings: IArmorPlateBlacklistSettings): boolean;
/** /**
* Create one flea offer for a specific item * Create one flea offer for a specific item
* @param sellerId Id of seller
* @param itemWithChildren Item to create offer for * @param itemWithChildren Item to create offer for
* @param isPreset Is item a weapon preset * @param isPreset Is item a weapon preset
* @param itemDetails raw db item details * @param itemToSellDetails Raw db item details
* @returns Item array * @returns Item array
*/ */
protected createSingleOfferForItem(itemWithChildren: IItem[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise<void>; protected createSingleOfferForItem(sellerId: string, itemWithChildren: IItem[], isPreset: boolean, itemToSellDetails: ITemplateItem): Promise<void>;
/** /**
* Generate trader offers on flea using the traders assort data * Generate trader offers on flea using the traders assort data
* @param traderID Trader to generate offers for * @param traderID Trader to generate offers for

View File

@ -66,5 +66,5 @@ export declare class WeatherGenerator {
protected getWeightedWindSpeed(): number; protected getWeightedWindSpeed(): number;
protected getWeightedFog(): number; protected getWeightedFog(): number;
protected getWeightedRain(): number; protected getWeightedRain(): number;
protected getRandomFloat(node: string): number; protected getRandomFloat(node: string, precision?: number): number;
} }

View File

@ -7,16 +7,18 @@ import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig";
import { ConfigServer } from "@spt/servers/ConfigServer"; import { ConfigServer } from "@spt/servers/ConfigServer";
import { GiftService } from "@spt/services/GiftService"; import { GiftService } from "@spt/services/GiftService";
import { MailSendService } from "@spt/services/MailSendService"; import { MailSendService } from "@spt/services/MailSendService";
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
import { RandomUtil } from "@spt/utils/RandomUtil"; import { RandomUtil } from "@spt/utils/RandomUtil";
export declare class SptDialogueChatBot implements IDialogueChatBot { export declare class SptDialogueChatBot implements IDialogueChatBot {
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected mailSendService: MailSendService; protected mailSendService: MailSendService;
protected seasonalEventService: SeasonalEventService;
protected giftService: GiftService; protected giftService: GiftService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected weatherConfig: IWeatherConfig; 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; getChatBot(): IUserDialogInfo;
/** /**
* Send responses back to player when they communicate with SPT friend on friends list * Send responses back to player when they communicate with SPT friend on friends list

View File

@ -41,12 +41,16 @@ export declare class InRaidHelper {
*/ */
setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; 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 * Remove FiR status from items
* Only removes property if item had FiR when entering raid * @param items Items to process
* @param postRaidProfile profile to update items for
* @returns Updated profile with SpawnedInSession removed
*/ */
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 * Clear PMC inventory of all items except those that are exempt
* Used post-raid to remove items after death * Used post-raid to remove items after death

View File

@ -536,6 +536,11 @@ export declare class ItemHelper {
*/ */
getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number; getRandomisedAmmoStackSize(ammoItemTemplate: ITemplateItem, maxLimit?: number): number;
getItemBaseType(tpl: string, rootOnly?: boolean): string; 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 { declare namespace ItemHelper {
interface IItemSize { interface IItemSize {

View File

@ -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 { IQuest, IQuestCondition, IQuestReward } from "@spt/models/eft/common/tables/IQuest";
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData"; import { IFailQuestRequestData } from "@spt/models/eft/quests/IFailQuestRequestData";
import { QuestStatus } from "@spt/models/enums/QuestStatus"; import { QuestStatus } from "@spt/models/enums/QuestStatus";
import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; 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 { LocaleService } from "@spt/services/LocaleService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { MailSendService } from "@spt/services/MailSendService"; import { MailSendService } from "@spt/services/MailSendService";
import { PlayerService } from "@spt/services/PlayerService";
import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService";
import { HashUtil } from "@spt/utils/HashUtil"; import { HashUtil } from "@spt/utils/HashUtil";
import { TimeUtil } from "@spt/utils/TimeUtil"; import { TimeUtil } from "@spt/utils/TimeUtil";
@ -44,10 +46,11 @@ export declare class QuestHelper {
protected traderHelper: TraderHelper; protected traderHelper: TraderHelper;
protected presetHelper: PresetHelper; protected presetHelper: PresetHelper;
protected mailSendService: MailSendService; protected mailSendService: MailSendService;
protected playerService: PlayerService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questConfig: IQuestConfig; 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 * Get status of a quest in player profile by its id
* @param pmcData Profile to search * @param pmcData Profile to search
@ -260,6 +263,13 @@ export declare class QuestHelper {
* @returns Array of reward objects * @returns Array of reward objects
*/ */
applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): IItem[]; 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 * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile
* also update client response recipeUnlocked array with craft id * also update client response recipeUnlocked array with craft id
@ -302,4 +312,63 @@ export declare class QuestHelper {
* @returns Hours item will be available for * @returns Hours item will be available for
*/ */
getMailItemRedeemTimeHoursForProfile(pmcData: IPmcData): number; 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;
} }

View File

@ -39,7 +39,7 @@ export declare class TraderHelper {
* @param sessionID Players id * @param sessionID Players id
* @returns Trader base * @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 * Get all assort data for a particular trader
* @param traderId Trader to get assorts for * @param traderId Trader to get assorts for

View File

@ -3,12 +3,25 @@ import { IItem } from "@spt/models/eft/common/tables/IItem";
export interface IGlobals { export interface IGlobals {
time: number; time: number;
config: IConfig; config: IConfig;
LocationInfection: ILocationInfection;
bot_presets: IBotPreset[]; bot_presets: IBotPreset[];
AudioSettings: IAudioSettings; AudioSettings: IAudioSettings;
EnvironmentSettings: IEnvironmentSettings; EnvironmentSettings: IEnvironmentSettings;
BotWeaponScatterings: IBotWeaponScattering[]; BotWeaponScatterings: IBotWeaponScattering[];
ItemPresets: Record<string, IPreset>; ItemPresets: Record<string, IPreset>;
} }
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 { export interface IArtilleryShelling {
ArtilleryMapsConfigs: Record<string, IArtilleryMapSettings>; ArtilleryMapsConfigs: Record<string, IArtilleryMapSettings>;
ProjectileExplosionParams: IProjectileExplosionParams; ProjectileExplosionParams: IProjectileExplosionParams;
@ -96,6 +109,7 @@ export interface IConfig {
MaxBotsAliveOnMapPvE: number; MaxBotsAliveOnMapPvE: number;
SavagePlayCooldown: number; SavagePlayCooldown: number;
SavagePlayCooldownNdaFree: number; SavagePlayCooldownNdaFree: number;
SeasonActivity: ISeasonActivity;
MarksmanAccuracy: number; MarksmanAccuracy: number;
SavagePlayCooldownDevelop: number; SavagePlayCooldownDevelop: number;
TODSkyDate: string; TODSkyDate: string;
@ -182,6 +196,14 @@ export interface IConfig {
Ballistic: IBallistic; Ballistic: IBallistic;
RepairSettings: IRepairSettings; RepairSettings: IRepairSettings;
} }
export interface ISeasonActivity {
InfectionHalloween: ISeasonActivityHalloween;
}
export interface ISeasonActivityHalloween {
DisplayUIEnabled: boolean;
Enabled: boolean;
ZombieBleedMul: number;
}
export interface IEnvironmentSetting2 { export interface IEnvironmentSetting2 {
EnvironmentUIData: IEnvironmentUIData; EnvironmentUIData: IEnvironmentUIData;
} }
@ -262,6 +284,7 @@ export interface ITransitSettings {
PercentageOfMissingEnergyRestore: number; PercentageOfMissingEnergyRestore: number;
PercentageOfMissingHealthRestore: number; PercentageOfMissingHealthRestore: number;
PercentageOfMissingWaterRestore: number; PercentageOfMissingWaterRestore: number;
RestoreHealthOnDestroyedParts: boolean;
ScavPriceMod: number; ScavPriceMod: number;
UsecPriceMod: number; UsecPriceMod: number;
active: boolean; active: boolean;
@ -634,6 +657,12 @@ export interface IEffects {
HeavyBleeding: IHeavyBleeding; HeavyBleeding: IHeavyBleeding;
LightBleeding: ILightBleeding; LightBleeding: ILightBleeding;
BodyTemperature: IBodyTemperature; BodyTemperature: IBodyTemperature;
ZombieInfection: IZombieInfection;
}
export interface IZombieInfection {
Dehydration: number;
HearingDebuffPercentage: number;
СumulativeTime: number;
} }
export interface IExistence { export interface IExistence {
EnergyLoopTime: number; EnergyLoopTime: number;
@ -1203,6 +1232,7 @@ export interface IInsurance {
CoefOfSendingMessageTime: number; CoefOfSendingMessageTime: number;
CoefOfHavingMarkOfUnknown: number; CoefOfHavingMarkOfUnknown: number;
EditionSendingMessageTime: Record<string, IMessageSendTImeMultipler>; EditionSendingMessageTime: Record<string, IMessageSendTImeMultipler>;
OnlyInDeathCase: boolean;
} }
export interface IMessageSendTImeMultipler { export interface IMessageSendTImeMultipler {
multiplier: number; multiplier: number;

View File

@ -77,6 +77,7 @@ export interface ILocationBase {
EscapeTimeLimit: number; EscapeTimeLimit: number;
EscapeTimeLimitCoop: number; EscapeTimeLimitCoop: number;
EscapeTimeLimitPVE: number; EscapeTimeLimitPVE: number;
Events: ILocationEvents;
exit_access_time: number; exit_access_time: number;
ForceOnlineRaidInPVE: boolean; ForceOnlineRaidInPVE: boolean;
exit_count: number; exit_count: number;
@ -99,6 +100,7 @@ export interface ILocationBase {
export interface ITransit { export interface ITransit {
activateAfterSec: string; activateAfterSec: string;
active: boolean; active: boolean;
name: string;
conditions: string; conditions: string;
description: string; description: string;
id: number; id: number;
@ -271,10 +273,36 @@ export interface IWave {
slots_min: number; slots_min: number;
time_max: number; time_max: number;
time_min: number; time_min: number;
/** OPTIONAL - Needs to be unique - Used by custom wave service to ensure same wave isnt added multiple times */
sptId?: string; sptId?: string;
ChanceGroup?: number; ChanceGroup?: number;
/** 'pve' and/or 'regular' */
SpawnMode: string[]; 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 { export declare enum WildSpawnType {
ASSAULT = "assault", ASSAULT = "assault",
MARKSMAN = "marksman", MARKSMAN = "marksman",

View File

@ -93,6 +93,7 @@ export interface IBotInfoSettings {
Experience: number; Experience: number;
StandingForKill: number; StandingForKill: number;
AggressorBonus: number; AggressorBonus: number;
UseSimpleAnimator: boolean;
} }
export interface IBan { export interface IBan {
banType: BanType; banType: BanType;
@ -218,6 +219,7 @@ export interface IVictim {
Level: number; Level: number;
Weapon: string; Weapon: string;
Role: string; Role: string;
Location: string;
} }
export interface ISessionCounters { export interface ISessionCounters {
Items: ICounterKeyValue[]; Items: ICounterKeyValue[];

View File

@ -97,10 +97,14 @@ export interface IDifficultyCategories {
Shoot: Record<string, string | number | boolean>; Shoot: Record<string, string | number | boolean>;
} }
export interface IExperience { export interface IExperience {
aggressorBonus: number; /** key = bot difficulty */
aggressorBonus: Record<string, number>;
level: MinMax; level: MinMax;
reward: MinMax; /** key = bot difficulty */
standingForKill: number; reward: Record<string, MinMax>;
/** key = bot difficulty */
standingForKill: Record<string, number>;
useSimpleAnimator: boolean;
} }
export interface IGeneration { export interface IGeneration {
items: IGenerationWeightingItems; items: IGenerationWeightingItems;

View File

@ -42,12 +42,18 @@ export interface IUpd {
SideEffect?: IUpdSideEffect; SideEffect?: IUpdSideEffect;
RepairKit?: IUpdRepairKit; RepairKit?: IUpdRepairKit;
CultistAmulet?: IUpdCultistAmulet; CultistAmulet?: IUpdCultistAmulet;
PinLockState?: PinLockState;
}
export declare enum PinLockState {
FREE = "Free",
LOCKED = "Locked",
PINNED = "Pinned"
} }
export interface IUpdBuff { export interface IUpdBuff {
rarity: string; Rarity: string;
buffType: string; BuffType: string;
value: number; Value: number;
thresholdDurability?: number; ThresholdDurability?: number;
} }
export interface IUpdTogglable { export interface IUpdTogglable {
On: boolean; On: boolean;

View File

@ -88,18 +88,23 @@ export interface IBarterScheme {
} }
export interface ISuit { export interface ISuit {
_id: string; _id: string;
externalObtain: boolean;
internalObtain: boolean;
isHiddenInPVE: boolean;
tid: string; tid: string;
suiteId: string; suiteId: string;
isActive: boolean; isActive: boolean;
requirements: ISuitRequirements; requirements: ISuitRequirements;
} }
export interface ISuitRequirements { export interface ISuitRequirements {
achievementRequirements: string[];
loyaltyLevel: number; loyaltyLevel: number;
profileLevel: number; profileLevel: number;
standing: number; standing: number;
skillRequirements: string[]; skillRequirements: string[];
questRequirements: string[]; questRequirements: string[];
itemRequirements: ItemRequirement[]; itemRequirements: ItemRequirement[];
requiredTid: string;
} }
export interface ItemRequirement { export interface ItemRequirement {
count: number; count: number;

View File

@ -17,6 +17,7 @@ export interface IHideoutProduction {
continuous: boolean; continuous: boolean;
count: number; count: number;
productionLimitCount: number; productionLimitCount: number;
isCodeProduction: boolean;
} }
export interface IRequirement extends IRequirementBase { export interface IRequirement extends IRequirementBase {
templateId?: string; templateId?: string;

View File

@ -1,4 +1,3 @@
import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData";
export interface IScavSaveRequestData { export interface IScavSaveRequestData extends IPostRaidPmcData {
profile: IPostRaidPmcData;
} }

View File

@ -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;
}

View File

@ -13,14 +13,15 @@ export interface IEndLocalRaidRequestData {
} }
export interface IEndRaidResult { export interface IEndRaidResult {
profile: IPmcData; profile: IPmcData;
/** "Survived/Transit etc" */ /** "Survived/Transit" etc */
result: string; result: ExitStatus;
ExitStatus: ExitStatus;
killerId: string; killerId: string;
killerAid: string; killerAid: string;
/** "Gate 3" etc */
exitName: string; exitName: string;
inSession: boolean; inSession: boolean;
favorite: boolean; favorite: boolean;
/** Seconds in raid */
playTime: number; playTime: number;
} }
export interface ILocationTransit { export interface ILocationTransit {
@ -33,6 +34,8 @@ export interface ILocationTransit {
raidMode: string; raidMode: string;
side: string; side: string;
dayTime: string; dayTime: string;
/** The location player last visited */
sptLastVisitedLocation: string;
} }
export interface ITransitProfile { export interface ITransitProfile {
_id: string; _id: string;

View File

@ -1,7 +1,8 @@
export declare enum ExitStatus { export declare enum ExitStatus {
SURVIVED = 0, SURVIVED = "Survived",
KILLED = 1, KILLED = "Killed",
LEFT = 2, LEFT = "Left",
RUNNER = 3, RUNNER = "Runner",
MISSINGINACTION = 4 MISSINGINACTION = "MissingInAction",
TRANSIT = "Transit"
} }

View File

@ -25,5 +25,6 @@ export declare enum ItemEventActions {
REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild", REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild",
REDEEM_PROFILE_REWARD = "RedeemProfileReward", REDEEM_PROFILE_REWARD = "RedeemProfileReward",
SET_FAVORITE_ITEMS = "SetFavoriteItems", SET_FAVORITE_ITEMS = "SetFavoriteItems",
QUEST_FAIL = "QuestFail" QUEST_FAIL = "QuestFail",
PIN_LOCK = "PinLock"
} }

View File

@ -3,5 +3,7 @@ export declare enum Season {
AUTUMN = 1, AUTUMN = 1,
WINTER = 2, WINTER = 2,
SPRING = 3, SPRING = 3,
STORM = 4 AUTUMN_LATE = 4,
SPRING_EARLY = 5,
STORM = 6
} }

View File

@ -4,5 +4,5 @@ export declare enum SeasonalEventType {
HALLOWEEN = "Halloween", HALLOWEEN = "Halloween",
NEW_YEARS = "NewYears", NEW_YEARS = "NewYears",
PROMO = "Promo", PROMO = "Promo",
SNOW = "Snow" APRIL_FOOLS = "AprilFools"
} }

View File

@ -54,5 +54,10 @@ export declare enum WildSpawnTypeNumber {
SKIER = 53, SKIER = 53,
SECTANTPREDVESTNIK = 57, SECTANTPREDVESTNIK = 57,
SECTANTPRIZRAK = 58, SECTANTPRIZRAK = 58,
SECTANTONI = 59 SECTANTONI = 59,
INFECTEDASSAULT = 60,
INFECTEDPMC = 61,
INFECTEDCIVIL = 62,
INFECTEDLABORANT = 63,
INFECTEDTAGILLA = 64
} }

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