Updated types

This commit is contained in:
Dev 2024-05-29 09:39:24 +01:00
parent 0c3131a43d
commit d73272ad2d
2568 changed files with 13104 additions and 8808 deletions

View File

@ -11,17 +11,17 @@ import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase";
import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase"; import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase";
import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData";
import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase";
import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil";
/** /**
* Handle client requests * Handle client requests
*/ */
export declare class DataCallbacks { export declare class DataCallbacks {
protected httpResponse: HttpResponseUtil; protected httpResponse: HttpResponseUtil;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected ragfairController: RagfairController; protected ragfairController: RagfairController;
protected hideoutController: HideoutController; protected hideoutController: HideoutController;
constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, ragfairController: RagfairController, hideoutController: HideoutController); constructor(httpResponse: HttpResponseUtil, databaseService: DatabaseService, ragfairController: RagfairController, hideoutController: HideoutController);
/** /**
* Handle client/settings * Handle client/settings
* @returns ISettingsBase * @returns ISettingsBase

View File

@ -65,7 +65,7 @@ export declare class DialogueCallbacks implements OnUpdate {
* Handle client/mail/dialog/getAllAttachments * Handle client/mail/dialog/getAllAttachments
* @returns IGetAllAttachmentsResponse * @returns IGetAllAttachmentsResponse
*/ */
getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData<IGetAllAttachmentsResponse>; getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData<IGetAllAttachmentsResponse | undefined>;
/** Handle client/mail/msg/send */ /** Handle client/mail/msg/send */
sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<string>; sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<string>;
/** Handle client/friend/request/list/outbox */ /** Handle client/friend/request/list/outbox */

View File

@ -16,15 +16,15 @@ import { IProfileStatusResponse } from "@spt/models/eft/match/IProfileStatusResp
import { IPutMetricsRequestData } from "@spt/models/eft/match/IPutMetricsRequestData"; import { IPutMetricsRequestData } from "@spt/models/eft/match/IPutMetricsRequestData";
import { IRequestIdRequest } from "@spt/models/eft/match/IRequestIdRequest"; import { IRequestIdRequest } from "@spt/models/eft/match/IRequestIdRequest";
import { IUpdatePingRequestData } from "@spt/models/eft/match/IUpdatePingRequestData"; import { IUpdatePingRequestData } from "@spt/models/eft/match/IUpdatePingRequestData";
import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil";
import { JsonUtil } from "@spt/utils/JsonUtil"; import { JsonUtil } from "@spt/utils/JsonUtil";
export declare class MatchCallbacks { export declare class MatchCallbacks {
protected httpResponse: HttpResponseUtil; protected httpResponse: HttpResponseUtil;
protected jsonUtil: JsonUtil; protected jsonUtil: JsonUtil;
protected matchController: MatchController; protected matchController: MatchController;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer); constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseService: DatabaseService);
/** Handle client/match/updatePing */ /** Handle client/match/updatePing */
updatePing(url: string, info: IUpdatePingRequestData, sessionID: string): INullResponseData; updatePing(url: string, info: IUpdatePingRequestData, sessionID: string): INullResponseData;
exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;

View File

@ -13,8 +13,8 @@ export declare class ApplicationContext {
* const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.RAID_CONFIGURATION).getValue<IGetRaidConfigurationRequestData>(); * const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.RAID_CONFIGURATION).getValue<IGetRaidConfigurationRequestData>();
* ``` * ```
*/ */
getLatestValue(type: ContextVariableType): ContextVariable; getLatestValue(type: ContextVariableType): ContextVariable | undefined;
getValues(type: ContextVariableType): ContextVariable[]; getValues(type: ContextVariableType): ContextVariable[] | undefined;
addValue(type: ContextVariableType, value: any): void; addValue(type: ContextVariableType, value: any): void;
clearValues(type: ContextVariableType): void; clearValues(type: ContextVariableType): void;
} }

View File

@ -1,14 +1,14 @@
import { ICompletedAchievementsResponse } from "@spt/models/eft/profile/ICompletedAchievementsResponse"; import { ICompletedAchievementsResponse } from "@spt/models/eft/profile/ICompletedAchievementsResponse";
import { IGetAchievementsResponse } from "@spt/models/eft/profile/IGetAchievementsResponse"; import { IGetAchievementsResponse } from "@spt/models/eft/profile/IGetAchievementsResponse";
import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ILogger } from "@spt/models/spt/utils/ILogger";
import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
/** /**
* Logic for handling In Raid callbacks * Logic for handling In Raid callbacks
*/ */
export declare class AchievementController { export declare class AchievementController {
protected logger: ILogger; protected logger: ILogger;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
constructor(logger: ILogger, databaseServer: DatabaseServer); constructor(logger: ILogger, databaseService: DatabaseService);
/** /**
* Get base achievements * Get base achievements
* @param sessionID Session id * @param sessionID Session id

View File

@ -14,8 +14,8 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig";
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 { DatabaseServer } from "@spt/servers/DatabaseServer";
import { BotGenerationCacheService } from "@spt/services/BotGenerationCacheService"; import { BotGenerationCacheService } from "@spt/services/BotGenerationCacheService";
import { DatabaseService } from "@spt/services/DatabaseService";
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 { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService";
@ -23,7 +23,7 @@ import { ICloner } from "@spt/utils/cloners/ICloner";
import { RandomUtil } from "@spt/utils/RandomUtil"; import { RandomUtil } from "@spt/utils/RandomUtil";
export declare class BotController { export declare class BotController {
protected logger: ILogger; protected logger: ILogger;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected botGenerator: BotGenerator; protected botGenerator: BotGenerator;
protected botHelper: BotHelper; protected botHelper: BotHelper;
protected botDifficultyHelper: BotDifficultyHelper; protected botDifficultyHelper: BotDifficultyHelper;
@ -38,7 +38,7 @@ export declare class BotController {
protected cloner: ICloner; protected cloner: ICloner;
protected botConfig: IBotConfig; protected botConfig: IBotConfig;
protected pmcConfig: IPmcConfig; protected pmcConfig: IPmcConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); constructor(logger: ILogger, databaseService: DatabaseService, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner);
/** /**
* Return the number of bot load-out varieties to be generated * Return the number of bot load-out varieties to be generated
* @param type bot Type we want the load-out gen count for * @param type bot Type we want the load-out gen count for

View File

@ -6,8 +6,8 @@ import { IRemoveBuildRequestData } from "@spt/models/eft/presetBuild/IRemoveBuil
import { IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; import { IUserBuilds } from "@spt/models/eft/profile/ISptProfile";
import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ILogger } from "@spt/models/spt/utils/ILogger";
import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder";
import { DatabaseServer } from "@spt/servers/DatabaseServer";
import { SaveServer } from "@spt/servers/SaveServer"; import { SaveServer } from "@spt/servers/SaveServer";
import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { ICloner } from "@spt/utils/cloners/ICloner"; import { ICloner } from "@spt/utils/cloners/ICloner";
import { HashUtil } from "@spt/utils/HashUtil"; import { HashUtil } from "@spt/utils/HashUtil";
@ -15,13 +15,13 @@ export declare class BuildController {
protected logger: ILogger; protected logger: ILogger;
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected eventOutputHolder: EventOutputHolder; protected eventOutputHolder: EventOutputHolder;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected cloner: ICloner; protected cloner: ICloner;
constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, localisationService: LocalisationService, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, profileHelper: ProfileHelper, localisationService: LocalisationService, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner);
/** Handle client/handbook/builds/my/list */ /** Handle client/handbook/builds/my/list */
getUserBuilds(sessionID: string): IUserBuilds; getUserBuilds(sessionID: string): IUserBuilds;
/** Handle client/builds/weapon/save */ /** Handle client/builds/weapon/save */

View File

@ -6,13 +6,13 @@ import { IWearClothingRequestData } from "@spt/models/eft/customization/IWearClo
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";
import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder";
import { DatabaseServer } from "@spt/servers/DatabaseServer";
import { SaveServer } from "@spt/servers/SaveServer"; import { SaveServer } from "@spt/servers/SaveServer";
import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
export declare class CustomizationController { export declare class CustomizationController {
protected logger: ILogger; protected logger: ILogger;
protected eventOutputHolder: EventOutputHolder; protected eventOutputHolder: EventOutputHolder;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
@ -20,7 +20,7 @@ export declare class CustomizationController {
lowerParentId: string; lowerParentId: string;
upperParentId: string; upperParentId: string;
}; };
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper); constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
/** /**
* Get purchasable clothing items from trader that match players side (usec/bear) * Get purchasable clothing items from trader that match players side (usec/bear)
* @param traderID trader to look up clothing for * @param traderID trader to look up clothing for

View File

@ -55,7 +55,7 @@ export declare class DialogueController {
* @param sessionID Player id * @param sessionID Player id
* @returns IUserDialogInfo array * @returns IUserDialogInfo array
*/ */
getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[]; getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined;
/** /**
* Handle client/mail/dialog/view * Handle client/mail/dialog/view
* Handle player clicking 'messenger' and seeing all the messages they've recieved * Handle player clicking 'messenger' and seeing all the messages they've recieved
@ -79,7 +79,7 @@ export declare class DialogueController {
* @param dialogUsers The participants of the mail * @param dialogUsers The participants of the mail
* @returns IUserDialogInfo array * @returns IUserDialogInfo array
*/ */
protected getProfilesForMail(fullProfile: ISptProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; protected getProfilesForMail(fullProfile: ISptProfile, dialogUsers?: IUserDialogInfo[]): IUserDialogInfo[];
/** /**
* Get a count of messages with attachments from a particular dialog * Get a count of messages with attachments from a particular dialog
* @param sessionID Session id * @param sessionID Session id
@ -116,7 +116,7 @@ export declare class DialogueController {
* @param sessionId Session id * @param sessionId Session id
* @returns IGetAllAttachmentsResponse * @returns IGetAllAttachmentsResponse
*/ */
getAllAttachments(dialogueId: string, sessionId: string): IGetAllAttachmentsResponse; getAllAttachments(dialogueId: string, sessionId: string): IGetAllAttachmentsResponse | undefined;
/** client/mail/msg/send */ /** client/mail/msg/send */
sendMessage(sessionId: string, request: ISendMessageRequest): string; sendMessage(sessionId: string, request: ISendMessageRequest): string;
/** /**

View File

@ -24,8 +24,8 @@ 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";
import { DatabaseServer } from "@spt/servers/DatabaseServer";
import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService"; import { CustomLocationWaveService } from "@spt/services/CustomLocationWaveService";
import { DatabaseService } from "@spt/services/DatabaseService";
import { GiftService } from "@spt/services/GiftService"; 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";
@ -40,7 +40,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil";
import { TimeUtil } from "@spt/utils/TimeUtil"; import { TimeUtil } from "@spt/utils/TimeUtil";
export declare class GameController { export declare class GameController {
protected logger: ILogger; protected logger: ILogger;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected preSptModLoader: PreSptModLoader; protected preSptModLoader: PreSptModLoader;
@ -68,7 +68,7 @@ export declare class GameController {
protected pmcConfig: IPmcConfig; protected pmcConfig: IPmcConfig;
protected lootConfig: ILootConfig; protected lootConfig: ILootConfig;
protected botConfig: IBotConfig; protected botConfig: IBotConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preSptModLoader: PreSptModLoader, httpServerHelper: HttpServerHelper, 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, 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);
load(): void; load(): void;
/** /**
* Handle client/game/start * Handle client/game/start

View File

@ -29,8 +29,8 @@ import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig";
import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ILogger } from "@spt/models/spt/utils/ILogger";
import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder";
import { ConfigServer } from "@spt/servers/ConfigServer"; import { ConfigServer } from "@spt/servers/ConfigServer";
import { DatabaseServer } from "@spt/servers/DatabaseServer";
import { SaveServer } from "@spt/servers/SaveServer"; import { SaveServer } from "@spt/servers/SaveServer";
import { DatabaseService } from "@spt/services/DatabaseService";
import { FenceService } from "@spt/services/FenceService"; import { FenceService } from "@spt/services/FenceService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { PlayerService } from "@spt/services/PlayerService"; import { PlayerService } from "@spt/services/PlayerService";
@ -44,7 +44,7 @@ export declare class HideoutController {
protected logger: ILogger; protected logger: ILogger;
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected inventoryHelper: InventoryHelper; protected inventoryHelper: InventoryHelper;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
@ -65,7 +65,7 @@ export declare class HideoutController {
/** Key used in TaskConditionCounters array */ /** Key used in TaskConditionCounters array */
protected static nameTaskConditionCountersCrafting: string; protected static nameTaskConditionCountersCrafting: string;
protected hideoutConfig: IHideoutConfig; protected hideoutConfig: IHideoutConfig;
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseService: DatabaseService, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner);
/** /**
* Handle HideoutUpgrade event * Handle HideoutUpgrade event
* Start a hideout area upgrade * Start a hideout area upgrade

View File

@ -21,8 +21,8 @@ import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig";
import { ITraderServiceModel } from "@spt/models/spt/services/ITraderServiceModel"; import { ITraderServiceModel } from "@spt/models/spt/services/ITraderServiceModel";
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 { DatabaseServer } from "@spt/servers/DatabaseServer";
import { SaveServer } from "@spt/servers/SaveServer"; import { SaveServer } from "@spt/servers/SaveServer";
import { DatabaseService } from "@spt/services/DatabaseService";
import { InsuranceService } from "@spt/services/InsuranceService"; import { InsuranceService } from "@spt/services/InsuranceService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { MailSendService } from "@spt/services/MailSendService"; import { MailSendService } from "@spt/services/MailSendService";
@ -38,7 +38,7 @@ export declare class InraidController {
protected logger: ILogger; protected logger: ILogger;
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected pmcChatResponseService: PmcChatResponseService; protected pmcChatResponseService: PmcChatResponseService;
protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
protected questHelper: QuestHelper; protected questHelper: QuestHelper;
@ -62,7 +62,7 @@ export declare class InraidController {
protected locationConfig: ILocationConfig; protected locationConfig: ILocationConfig;
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
protected hideoutConfig: IHideoutConfig; protected hideoutConfig: IHideoutConfig;
constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseService: DatabaseService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, localisationService: LocalisationService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil);
/** /**
* Save locationId to active profiles inraid object AND app context * Save locationId to active profiles inraid object AND app context
* @param sessionID Session id * @param sessionID Session id

View File

@ -14,9 +14,10 @@ import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig";
import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ILogger } from "@spt/models/spt/utils/ILogger";
import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder";
import { ConfigServer } from "@spt/servers/ConfigServer"; import { ConfigServer } from "@spt/servers/ConfigServer";
import { DatabaseServer } from "@spt/servers/DatabaseServer";
import { SaveServer } from "@spt/servers/SaveServer"; import { SaveServer } from "@spt/servers/SaveServer";
import { DatabaseService } from "@spt/services/DatabaseService";
import { InsuranceService } from "@spt/services/InsuranceService"; import { InsuranceService } from "@spt/services/InsuranceService";
import { LocalisationService } from "@spt/services/LocalisationService";
import { MailSendService } from "@spt/services/MailSendService"; import { MailSendService } from "@spt/services/MailSendService";
import { PaymentService } from "@spt/services/PaymentService"; import { PaymentService } from "@spt/services/PaymentService";
import { RagfairPriceService } from "@spt/services/RagfairPriceService"; import { RagfairPriceService } from "@spt/services/RagfairPriceService";
@ -33,7 +34,7 @@ export declare class InsuranceController {
protected eventOutputHolder: EventOutputHolder; protected eventOutputHolder: EventOutputHolder;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected dialogueHelper: DialogueHelper; protected dialogueHelper: DialogueHelper;
@ -43,11 +44,12 @@ export declare class InsuranceController {
protected insuranceService: InsuranceService; protected insuranceService: InsuranceService;
protected mailSendService: MailSendService; protected mailSendService: MailSendService;
protected ragfairPriceService: RagfairPriceService; protected ragfairPriceService: RagfairPriceService;
protected localisationService: LocalisationService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected insuranceConfig: IInsuranceConfig; protected insuranceConfig: IInsuranceConfig;
protected roubleTpl: string; protected roubleTpl: string;
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner);
/** /**
* Process insurance items of all profiles prior to being given back to the player through the mail service. * Process insurance items of all profiles prior to being given back to the player through the mail service.
* *
@ -181,9 +183,9 @@ export declare class InsuranceController {
* *
* @param traderId The ID of the trader who insured the item. * @param traderId The ID of the trader who insured the item.
* @param insuredItem Optional. The item to roll for. Only used for logging. * @param insuredItem Optional. The item to roll for. Only used for logging.
* @returns true if the insured item should be removed from inventory, false otherwise, or null on error. * @returns true if the insured item should be removed from inventory, false otherwise, or undefined on error.
*/ */
protected rollForDelete(traderId: string, insuredItem?: Item): boolean | null; protected rollForDelete(traderId: string, insuredItem?: Item): boolean | undefined;
/** /**
* Handle Insure event * Handle Insure event
* Add insurance to an item * Add insurance to an item

View File

@ -6,6 +6,7 @@ import { PaymentHelper } from "@spt/helpers/PaymentHelper";
import { PresetHelper } from "@spt/helpers/PresetHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper"; import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IInventoryBindRequestData } from "@spt/models/eft/inventory/IInventoryBindRequestData"; import { IInventoryBindRequestData } from "@spt/models/eft/inventory/IInventoryBindRequestData";
import { IInventoryCreateMarkerRequestData } from "@spt/models/eft/inventory/IInventoryCreateMarkerRequestData"; import { IInventoryCreateMarkerRequestData } from "@spt/models/eft/inventory/IInventoryCreateMarkerRequestData";
@ -30,7 +31,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo
import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile";
import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ILogger } from "@spt/models/spt/utils/ILogger";
import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder";
import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { FenceService } from "@spt/services/FenceService"; import { FenceService } from "@spt/services/FenceService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { PlayerService } from "@spt/services/PlayerService"; import { PlayerService } from "@spt/services/PlayerService";
@ -44,7 +45,7 @@ export declare class InventoryController {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected fenceService: FenceService; protected fenceService: FenceService;
protected presetHelper: PresetHelper; protected presetHelper: PresetHelper;
protected inventoryHelper: InventoryHelper; protected inventoryHelper: InventoryHelper;
@ -53,13 +54,14 @@ export declare class InventoryController {
protected ragfairOfferService: RagfairOfferService; protected ragfairOfferService: RagfairOfferService;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected paymentHelper: PaymentHelper; protected paymentHelper: PaymentHelper;
protected traderHelper: TraderHelper;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected playerService: PlayerService; protected playerService: PlayerService;
protected lootGenerator: LootGenerator; protected lootGenerator: LootGenerator;
protected eventOutputHolder: EventOutputHolder; protected eventOutputHolder: EventOutputHolder;
protected httpResponseUtil: HttpResponseUtil; protected httpResponseUtil: HttpResponseUtil;
protected cloner: ICloner; protected cloner: ICloner;
constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseService: DatabaseService, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, traderHelper: TraderHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner);
/** /**
* Move Item * Move Item
* change location of item with parentId and slotId * change location of item with parentId and slotId

View File

@ -10,8 +10,8 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig";
import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData";
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 { DatabaseServer } from "@spt/servers/DatabaseServer";
import { SaveServer } from "@spt/servers/SaveServer"; import { SaveServer } from "@spt/servers/SaveServer";
import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { HashUtil } from "@spt/utils/HashUtil"; import { HashUtil } from "@spt/utils/HashUtil";
import { RandomUtil } from "@spt/utils/RandomUtil"; import { RandomUtil } from "@spt/utils/RandomUtil";
@ -24,12 +24,12 @@ export declare class LauncherController {
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected httpServerHelper: HttpServerHelper; protected httpServerHelper: HttpServerHelper;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected preSptModLoader: PreSptModLoader; protected preSptModLoader: PreSptModLoader;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preSptModLoader: PreSptModLoader, configServer: ConfigServer); constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, preSptModLoader: PreSptModLoader, configServer: ConfigServer);
connect(): IConnectResponse; connect(): IConnectResponse;
/** /**
* Get descriptive text for each of the profile edtions a player can choose, keyed by profile.json profile type e.g. "Edge Of Darkness" * Get descriptive text for each of the profile edtions a player can choose, keyed by profile.json profile type e.g. "Edge Of Darkness"

View File

@ -12,7 +12,7 @@ import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig";
import { LootRequest } from "@spt/models/spt/services/LootRequest"; import { LootRequest } from "@spt/models/spt/services/LootRequest";
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 { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { ItemFilterService } from "@spt/services/ItemFilterService"; import { ItemFilterService } from "@spt/services/ItemFilterService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService"; import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService";
@ -30,14 +30,14 @@ export declare class LocationController {
protected raidTimeAdjustmentService: RaidTimeAdjustmentService; protected raidTimeAdjustmentService: RaidTimeAdjustmentService;
protected itemFilterService: ItemFilterService; protected itemFilterService: ItemFilterService;
protected lootGenerator: LootGenerator; protected lootGenerator: LootGenerator;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected applicationContext: ApplicationContext; protected applicationContext: ApplicationContext;
protected cloner: ICloner; protected cloner: ICloner;
protected airdropConfig: IAirdropConfig; protected airdropConfig: IAirdropConfig;
protected locationConfig: ILocationConfig; protected locationConfig: ILocationConfig;
constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner);
/** /**
* Handle client/location/getLocalloot * Handle client/location/getLocalloot
* Get a location (map) with generated loot data * Get a location (map) with generated loot data
@ -47,7 +47,7 @@ export declare class LocationController {
*/ */
get(sessionId: string, request: IGetLocationRequestData): ILocationBase; get(sessionId: string, request: IGetLocationRequestData): ILocationBase;
/** /**
* Generate a maps base location with loot * Generate a maps base location and loot
* @param name Map name * @param name Map name
* @returns ILocationBase * @returns ILocationBase
*/ */

View File

@ -1,10 +1,10 @@
import { PresetHelper } from "@spt/helpers/PresetHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper";
import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ILogger } from "@spt/models/spt/utils/ILogger";
import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
export declare class PresetController { export declare class PresetController {
protected logger: ILogger; protected logger: ILogger;
protected presetHelper: PresetHelper; protected presetHelper: PresetHelper;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
constructor(logger: ILogger, presetHelper: PresetHelper, databaseServer: DatabaseServer); constructor(logger: ILogger, presetHelper: PresetHelper, databaseService: DatabaseService);
initialize(): void; initialize(): void;
} }

View File

@ -19,8 +19,8 @@ import { ISptProfile } from "@spt/models/eft/profile/ISptProfile";
import { IValidateNicknameRequestData } from "@spt/models/eft/profile/IValidateNicknameRequestData"; import { IValidateNicknameRequestData } from "@spt/models/eft/profile/IValidateNicknameRequestData";
import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ILogger } from "@spt/models/spt/utils/ILogger";
import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder";
import { DatabaseServer } from "@spt/servers/DatabaseServer";
import { SaveServer } from "@spt/servers/SaveServer"; import { SaveServer } from "@spt/servers/SaveServer";
import { DatabaseService } from "@spt/services/DatabaseService";
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 { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService";
@ -32,7 +32,7 @@ export declare class ProfileController {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected profileFixerService: ProfileFixerService; protected profileFixerService: ProfileFixerService;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
@ -44,7 +44,8 @@ export declare class ProfileController {
protected dialogueHelper: DialogueHelper; protected dialogueHelper: DialogueHelper;
protected questHelper: QuestHelper; protected questHelper: QuestHelper;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, mailSendService: MailSendService, playerScavGenerator: PlayerScavGenerator, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, questHelper: QuestHelper, profileHelper: ProfileHelper); protected defaultInventoryTpl: string;
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, mailSendService: MailSendService, playerScavGenerator: PlayerScavGenerator, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, questHelper: QuestHelper, profileHelper: ProfileHelper);
/** /**
* Handle /launcher/profiles * Handle /launcher/profiles
*/ */
@ -84,9 +85,9 @@ export declare class ProfileController {
protected givePlayerStartingQuestRewards(profileDetails: ISptProfile, sessionID: string, response: IItemEventRouterResponse): void; protected givePlayerStartingQuestRewards(profileDetails: ISptProfile, sessionID: string, response: IItemEventRouterResponse): void;
/** /**
* For each trader reset their state to what a level 1 player would see * For each trader reset their state to what a level 1 player would see
* @param sessionID Session id of profile to reset * @param sessionId Session id of profile to reset
*/ */
protected resetAllTradersInProfile(sessionID: string): void; protected resetAllTradersInProfile(sessionId: string): void;
/** /**
* Generate a player scav object * Generate a player scav object
* PMC profile MUST exist first before pscav can be generated * PMC profile MUST exist first before pscav can be generated

View File

@ -18,7 +18,7 @@ import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig";
import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ILogger } from "@spt/models/spt/utils/ILogger";
import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder";
import { ConfigServer } from "@spt/servers/ConfigServer"; import { ConfigServer } from "@spt/servers/ConfigServer";
import { DatabaseServer } from "@spt/servers/DatabaseServer"; 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";
@ -32,7 +32,7 @@ export declare class QuestController {
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected httpResponseUtil: HttpResponseUtil; protected httpResponseUtil: HttpResponseUtil;
protected eventOutputHolder: EventOutputHolder; protected eventOutputHolder: EventOutputHolder;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected dialogueHelper: DialogueHelper; protected dialogueHelper: DialogueHelper;
protected mailSendService: MailSendService; protected mailSendService: MailSendService;
@ -47,7 +47,7 @@ export declare class QuestController {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questConfig: IQuestConfig; protected questConfig: IQuestConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner);
/** /**
* Handle client/quest/list * Handle client/quest/list
* Get all quests visible to player * Get all quests visible to player
@ -126,7 +126,7 @@ export declare class QuestController {
* @param postQuestStatuses Quests after * @param postQuestStatuses Quests after
* @returns QuestStatusChange array * @returns QuestStatusChange array
*/ */
protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[]; protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[] | undefined;
/** /**
* Send a popup to player on successful completion of a quest * Send a popup to player on successful completion of a quest
* @param sessionID session id * @param sessionID session id

View File

@ -28,9 +28,9 @@ 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 { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder";
import { ConfigServer } from "@spt/servers/ConfigServer"; import { ConfigServer } from "@spt/servers/ConfigServer";
import { DatabaseServer } from "@spt/servers/DatabaseServer";
import { RagfairServer } from "@spt/servers/RagfairServer"; import { RagfairServer } from "@spt/servers/RagfairServer";
import { SaveServer } from "@spt/servers/SaveServer"; import { SaveServer } from "@spt/servers/SaveServer";
import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { PaymentService } from "@spt/services/PaymentService"; import { PaymentService } from "@spt/services/PaymentService";
import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairOfferService } from "@spt/services/RagfairOfferService";
@ -49,7 +49,7 @@ export declare class RagfairController {
protected eventOutputHolder: EventOutputHolder; protected eventOutputHolder: EventOutputHolder;
protected ragfairServer: RagfairServer; protected ragfairServer: RagfairServer;
protected ragfairPriceService: RagfairPriceService; protected ragfairPriceService: RagfairPriceService;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected ragfairSellHelper: RagfairSellHelper; protected ragfairSellHelper: RagfairSellHelper;
@ -69,7 +69,7 @@ export declare class RagfairController {
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseService: DatabaseService, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer);
/** /**
* Handles client/ragfair/find * Handles client/ragfair/find
* Returns flea offers that match required search parameters * Returns flea offers that match required search parameters
@ -180,8 +180,8 @@ export declare class RagfairController {
* @returns Array of items from player inventory * @returns Array of items from player inventory
*/ */
protected getItemsToListOnFleaFromInventory(pmcData: IPmcData, itemIdsFromFleaOfferRequest: string[]): { protected getItemsToListOnFleaFromInventory(pmcData: IPmcData, itemIdsFromFleaOfferRequest: string[]): {
items: Item[] | null; items: Item[] | undefined;
errorMessage: string | null; errorMessage: string | undefined;
}; };
createPlayerOffer(sessionId: string, requirements: Requirement[], items: Item[], sellInOnePiece: boolean): IRagfairOffer; createPlayerOffer(sessionId: string, requirements: Requirement[], items: Item[], sellInOnePiece: boolean): IRagfairOffer;
getAllFleaPrices(): Record<string, number>; getAllFleaPrices(): Record<string, number>;

View File

@ -9,13 +9,13 @@ import { ITraderRepairActionDataRequest } from "@spt/models/eft/repair/ITraderRe
import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig";
import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ILogger } from "@spt/models/spt/utils/ILogger";
import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder";
import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { PaymentService } from "@spt/services/PaymentService"; import { PaymentService } from "@spt/services/PaymentService";
import { RepairService } from "@spt/services/RepairService"; import { RepairService } from "@spt/services/RepairService";
export declare class RepairController { export declare class RepairController {
protected logger: ILogger; protected logger: ILogger;
protected eventOutputHolder: EventOutputHolder; protected eventOutputHolder: EventOutputHolder;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected questHelper: QuestHelper; protected questHelper: QuestHelper;
protected traderHelper: TraderHelper; protected traderHelper: TraderHelper;
protected paymentService: PaymentService; protected paymentService: PaymentService;
@ -23,7 +23,7 @@ export declare class RepairController {
protected repairService: RepairService; protected repairService: RepairService;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected repairConfig: IRepairConfig; protected repairConfig: IRepairConfig;
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, repairService: RepairService, profileHelper: ProfileHelper); constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, repairService: RepairService, profileHelper: ProfileHelper);
/** /**
* Handle TraderRepair event * Handle TraderRepair event
* Repair with trader * Repair with trader

View File

@ -13,7 +13,8 @@ import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool";
import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ILogger } from "@spt/models/spt/utils/ILogger";
import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder";
import { ConfigServer } from "@spt/servers/ConfigServer"; import { ConfigServer } from "@spt/servers/ConfigServer";
import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService";
import { PaymentService } from "@spt/services/PaymentService"; import { PaymentService } from "@spt/services/PaymentService";
import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService";
import { ICloner } from "@spt/utils/cloners/ICloner"; import { ICloner } from "@spt/utils/cloners/ICloner";
@ -23,12 +24,13 @@ import { RandomUtil } from "@spt/utils/RandomUtil";
import { TimeUtil } from "@spt/utils/TimeUtil"; import { TimeUtil } from "@spt/utils/TimeUtil";
export declare class RepeatableQuestController { export declare class RepeatableQuestController {
protected logger: ILogger; protected logger: ILogger;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected httpResponse: HttpResponseUtil; protected httpResponse: HttpResponseUtil;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected profileFixerService: ProfileFixerService; protected profileFixerService: ProfileFixerService;
protected localisationService: LocalisationService;
protected eventOutputHolder: EventOutputHolder; protected eventOutputHolder: EventOutputHolder;
protected paymentService: PaymentService; protected paymentService: PaymentService;
protected objectId: ObjectId; protected objectId: ObjectId;
@ -38,7 +40,7 @@ export declare class RepeatableQuestController {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questConfig: IQuestConfig; protected questConfig: IQuestConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner);
/** /**
* Handle client/repeatalbeQuests/activityPeriods * Handle client/repeatalbeQuests/activityPeriods
* Returns an array of objects in the format of repeatable quests to the client. * Returns an array of objects in the format of repeatable quests to the client.

View File

@ -16,8 +16,8 @@ import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig";
import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ILogger } from "@spt/models/spt/utils/ILogger";
import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder";
import { ConfigServer } from "@spt/servers/ConfigServer"; import { ConfigServer } from "@spt/servers/ConfigServer";
import { DatabaseServer } from "@spt/servers/DatabaseServer";
import { RagfairServer } from "@spt/servers/RagfairServer"; import { RagfairServer } from "@spt/servers/RagfairServer";
import { DatabaseService } from "@spt/services/DatabaseService";
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 { RagfairPriceService } from "@spt/services/RagfairPriceService"; import { RagfairPriceService } from "@spt/services/RagfairPriceService";
@ -27,7 +27,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil";
import { TimeUtil } from "@spt/utils/TimeUtil"; import { TimeUtil } from "@spt/utils/TimeUtil";
export declare class TradeController { export declare class TradeController {
protected logger: ILogger; protected logger: ILogger;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected eventOutputHolder: EventOutputHolder; protected eventOutputHolder: EventOutputHolder;
protected tradeHelper: TradeHelper; protected tradeHelper: TradeHelper;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
@ -45,7 +45,7 @@ export declare class TradeController {
protected roubleTpl: string; protected roubleTpl: string;
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); constructor(logger: ILogger, databaseService: DatabaseService, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer);
/** Handle TradingConfirm event */ /** Handle TradingConfirm event */
confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
/** Handle RagFairBuyOffer event */ /** Handle RagFairBuyOffer event */

View File

@ -6,7 +6,7 @@ import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrade
import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig";
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 { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { FenceService } from "@spt/services/FenceService"; import { FenceService } from "@spt/services/FenceService";
import { TraderAssortService } from "@spt/services/TraderAssortService"; import { TraderAssortService } from "@spt/services/TraderAssortService";
import { TraderPurchasePersisterService } from "@spt/services/TraderPurchasePersisterService"; import { TraderPurchasePersisterService } from "@spt/services/TraderPurchasePersisterService";
@ -15,7 +15,7 @@ import { TimeUtil } from "@spt/utils/TimeUtil";
export declare class TraderController { export declare class TraderController {
protected logger: ILogger; protected logger: ILogger;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected traderAssortHelper: TraderAssortHelper; protected traderAssortHelper: TraderAssortHelper;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected traderHelper: TraderHelper; protected traderHelper: TraderHelper;
@ -26,7 +26,7 @@ export declare class TraderController {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); constructor(logger: ILogger, timeUtil: TimeUtil, databaseService: DatabaseService, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner);
/** /**
* Runs when onLoad event is fired * Runs when onLoad event is fired
* Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService

View File

@ -5,6 +5,7 @@ import { DependencyContainer } from "tsyringe";
export declare class Container { export declare class Container {
static registerPostLoadTypes(container: DependencyContainer, childContainer: DependencyContainer): void; static registerPostLoadTypes(container: DependencyContainer, childContainer: DependencyContainer): void;
static registerTypes(depContainer: DependencyContainer): void; static registerTypes(depContainer: DependencyContainer): void;
static registerPrimaryDependencies(depContainer: DependencyContainer): void;
static registerListTypes(depContainer: DependencyContainer): void; static registerListTypes(depContainer: DependencyContainer): void;
private static registerUtils; private static registerUtils;
private static registerRouters; private static registerRouters;

View File

@ -17,23 +17,23 @@ import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest";
import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig";
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 { DatabaseServer } from "@spt/servers/DatabaseServer";
import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService";
import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService";
import { BotWeaponModLimitService } from "@spt/services/BotWeaponModLimitService"; import { BotWeaponModLimitService } from "@spt/services/BotWeaponModLimitService";
import { DatabaseService } from "@spt/services/DatabaseService";
import { ItemFilterService } from "@spt/services/ItemFilterService"; import { ItemFilterService } from "@spt/services/ItemFilterService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { ICloner } from "@spt/utils/cloners/ICloner"; import { ICloner } from "@spt/utils/cloners/ICloner";
import { HashUtil } from "@spt/utils/HashUtil"; import { HashUtil } from "@spt/utils/HashUtil";
import { RandomUtil } from "@spt/utils/RandomUtil"; import { RandomUtil } from "@spt/utils/RandomUtil";
import { IFilterPlateModsForSlotByLevelResult } from "../models/spt/bots/IFilterPlateModsForSlotByLevelResult";
import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator";
import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult";
export declare class BotEquipmentModGenerator { export declare class BotEquipmentModGenerator {
protected logger: ILogger; protected logger: ILogger;
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected probabilityHelper: ProbabilityHelper; protected probabilityHelper: ProbabilityHelper;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentFilterService: BotEquipmentFilterService;
protected itemFilterService: ItemFilterService; protected itemFilterService: ItemFilterService;
@ -49,7 +49,7 @@ export declare class BotEquipmentModGenerator {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected botConfig: IBotConfig; protected botConfig: IBotConfig;
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseService: DatabaseService, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner);
/** /**
* Check mods are compatible and add to array * Check mods are compatible and add to array
* @param equipment Equipment item to add mods to * @param equipment Equipment item to add mods to
@ -117,7 +117,7 @@ export declare class BotEquipmentModGenerator {
* @param request Data used to choose an appropriate mod with * @param request Data used to choose an appropriate mod with
* @returns itemHelper.getItem() result * @returns itemHelper.getItem() result
*/ */
protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem]; protected chooseModToPutIntoSlot(request: IModToSpawnRequest): [boolean, ITemplateItem] | undefined;
protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult; protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult;
/** /**
* Filter mod pool down based on various criteria: * Filter mod pool down based on various criteria:
@ -140,7 +140,7 @@ export declare class BotEquipmentModGenerator {
* @param parentItemTpl * @param parentItemTpl
* @returns Default preset found * @returns Default preset found
*/ */
protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset | undefined;
/** /**
* Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible * Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible
* @param weapon Weapon * @param weapon Weapon
@ -172,7 +172,7 @@ export declare class BotEquipmentModGenerator {
* @param items items to ensure picked mod is compatible with * @param items items to ensure picked mod is compatible with
* @returns item tpl * @returns item tpl
*/ */
protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string | undefined;
/** /**
* Check if mod exists in db + is for a required slot * Check if mod exists in db + is for a required slot
* @param modToAdd Db template of mod to check * @param modToAdd Db template of mod to check

View File

@ -11,8 +11,8 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig";
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 { DatabaseServer } from "@spt/servers/DatabaseServer";
import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService";
import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService";
import { ICloner } from "@spt/utils/cloners/ICloner"; import { ICloner } from "@spt/utils/cloners/ICloner";
@ -25,7 +25,7 @@ export declare class BotGenerator {
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected botInventoryGenerator: BotInventoryGenerator; protected botInventoryGenerator: BotInventoryGenerator;
protected botLevelGenerator: BotLevelGenerator; protected botLevelGenerator: BotLevelGenerator;
protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentFilterService: BotEquipmentFilterService;
@ -38,7 +38,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, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, 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, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, 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

View File

@ -11,8 +11,8 @@ import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots";
import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig";
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 { DatabaseServer } from "@spt/servers/DatabaseServer";
import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService";
import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { HashUtil } from "@spt/utils/HashUtil"; import { HashUtil } from "@spt/utils/HashUtil";
import { RandomUtil } from "@spt/utils/RandomUtil"; import { RandomUtil } from "@spt/utils/RandomUtil";
@ -20,7 +20,7 @@ export declare class BotInventoryGenerator {
protected logger: ILogger; protected logger: ILogger;
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected botWeaponGenerator: BotWeaponGenerator; protected botWeaponGenerator: BotWeaponGenerator;
protected botLootGenerator: BotLootGenerator; protected botLootGenerator: BotLootGenerator;
protected botGeneratorHelper: BotGeneratorHelper; protected botGeneratorHelper: BotGeneratorHelper;
@ -32,7 +32,7 @@ export declare class BotInventoryGenerator {
protected botEquipmentModGenerator: BotEquipmentModGenerator; protected botEquipmentModGenerator: BotEquipmentModGenerator;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected botConfig: IBotConfig; protected botConfig: IBotConfig;
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer);
/** /**
* Add equipment/weapons/loot to bot * Add equipment/weapons/loot to bot
* @param sessionId Session id * @param sessionId Session id

View File

@ -3,13 +3,13 @@ import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLev
import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase";
import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ILogger } from "@spt/models/spt/utils/ILogger";
import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { RandomUtil } from "@spt/utils/RandomUtil"; import { RandomUtil } from "@spt/utils/RandomUtil";
export declare class BotLevelGenerator { export declare class BotLevelGenerator {
protected logger: ILogger; protected logger: ILogger;
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); constructor(logger: ILogger, randomUtil: RandomUtil, databaseService: DatabaseService);
/** /**
* Return a randomised bot level and exp value * Return a randomised bot level and exp value
* @param levelDetails Min and max of level for bot * @param levelDetails Min and max of level for bot

View File

@ -15,8 +15,8 @@ import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig";
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 { DatabaseServer } from "@spt/servers/DatabaseServer";
import { BotLootCacheService } from "@spt/services/BotLootCacheService"; import { BotLootCacheService } from "@spt/services/BotLootCacheService";
import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { ICloner } from "@spt/utils/cloners/ICloner"; import { ICloner } from "@spt/utils/cloners/ICloner";
import { HashUtil } from "@spt/utils/HashUtil"; import { HashUtil } from "@spt/utils/HashUtil";
@ -27,7 +27,7 @@ export declare class BotLootGenerator {
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected inventoryHelper: InventoryHelper; protected inventoryHelper: InventoryHelper;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected handbookHelper: HandbookHelper; protected handbookHelper: HandbookHelper;
protected botGeneratorHelper: BotGeneratorHelper; protected botGeneratorHelper: BotGeneratorHelper;
protected botWeaponGenerator: BotWeaponGenerator; protected botWeaponGenerator: BotWeaponGenerator;
@ -39,7 +39,7 @@ export declare class BotLootGenerator {
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, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseService: DatabaseService, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner);
protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings;
/** /**
* Add loot to bots containers * Add loot to bots containers

View File

@ -14,8 +14,8 @@ import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig";
import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig";
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 { DatabaseServer } from "@spt/servers/DatabaseServer";
import { BotWeaponModLimitService } from "@spt/services/BotWeaponModLimitService"; import { BotWeaponModLimitService } from "@spt/services/BotWeaponModLimitService";
import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { RepairService } from "@spt/services/RepairService"; import { RepairService } from "@spt/services/RepairService";
import { ICloner } from "@spt/utils/cloners/ICloner"; import { ICloner } from "@spt/utils/cloners/ICloner";
@ -24,7 +24,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil";
export declare class BotWeaponGenerator { export declare class BotWeaponGenerator {
protected logger: ILogger; protected logger: ILogger;
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected weightedRandomHelper: WeightedRandomHelper; protected weightedRandomHelper: WeightedRandomHelper;
protected botGeneratorHelper: BotGeneratorHelper; protected botGeneratorHelper: BotGeneratorHelper;
@ -41,7 +41,7 @@ export declare class BotWeaponGenerator {
protected botConfig: IBotConfig; protected botConfig: IBotConfig;
protected pmcConfig: IPmcConfig; protected pmcConfig: IPmcConfig;
protected repairConfig: IRepairConfig; protected repairConfig: IRepairConfig;
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); constructor(logger: ILogger, hashUtil: HashUtil, databaseService: DatabaseService, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner);
/** /**
* Pick a random weapon based on weightings and generate a functional weapon * Pick a random weapon based on weightings and generate a functional weapon
* @param equipmentSlot Primary/secondary/holster * @param equipmentSlot Primary/secondary/holster

View File

@ -6,7 +6,7 @@ import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig";
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 { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { FenceService } from "@spt/services/FenceService"; import { FenceService } from "@spt/services/FenceService";
import { ItemFilterService } from "@spt/services/ItemFilterService"; import { ItemFilterService } from "@spt/services/ItemFilterService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
@ -15,7 +15,7 @@ import { HashUtil } from "@spt/utils/HashUtil";
export declare class FenceBaseAssortGenerator { export declare class FenceBaseAssortGenerator {
protected logger: ILogger; protected logger: ILogger;
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected handbookHelper: HandbookHelper; protected handbookHelper: HandbookHelper;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected presetHelper: PresetHelper; protected presetHelper: PresetHelper;
@ -25,7 +25,7 @@ export declare class FenceBaseAssortGenerator {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected fenceService: FenceService; protected fenceService: FenceService;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, fenceService: FenceService); constructor(logger: ILogger, hashUtil: HashUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, fenceService: FenceService);
/** /**
* Create base fence assorts dynamically and store in memory * Create base fence assorts dynamically and store in memory
*/ */
@ -39,9 +39,9 @@ export declare class FenceBaseAssortGenerator {
/** /**
* Get the penetration power value of an ammo, works with ammo boxes and raw ammos * Get the penetration power value of an ammo, works with ammo boxes and raw ammos
* @param rootItemDb Ammo box or ammo item from items.db * @param rootItemDb Ammo box or ammo item from items.db
* @returns Penetration power of passed in item, null if it doesnt have a power * @returns Penetration power of passed in item, undefined if it doesnt have a power
*/ */
protected getAmmoPenetrationPower(rootItemDb: ITemplateItem): number; protected getAmmoPenetrationPower(rootItemDb: ITemplateItem): number | undefined;
/** /**
* Add soft inserts + armor plates to an armor * Add soft inserts + armor plates to an armor
* @param armor Armor item array to add mods into * @param armor Armor item array to add mods into

View File

@ -8,7 +8,7 @@ import { Item } 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";
import { ConfigServer } from "@spt/servers/ConfigServer"; import { ConfigServer } from "@spt/servers/ConfigServer";
import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService";
import { ICloner } from "@spt/utils/cloners/ICloner"; import { ICloner } from "@spt/utils/cloners/ICloner";
@ -28,7 +28,7 @@ export interface IContainerGroupCount {
} }
export declare class LocationGenerator { export declare class LocationGenerator {
protected logger: ILogger; protected logger: ILogger;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected objectId: ObjectId; protected objectId: ObjectId;
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
@ -40,7 +40,7 @@ export declare class LocationGenerator {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected locationConfig: ILocationConfig; protected locationConfig: ILocationConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); constructor(logger: ILogger, databaseService: DatabaseService, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner);
/** /**
* Create an array of container objects with randomised loot * Create an array of container objects with randomised loot
* @param locationBase Map base to generate containers for * @param locationBase Map base to generate containers for
@ -143,6 +143,6 @@ export declare class LocationGenerator {
* @param chosenTpl Tpl we want to get item with * @param chosenTpl Tpl we want to get item with
* @returns Item object * @returns Item object
*/ */
protected getItemInArray(items: Item[], chosenTpl: string): Item; protected getItemInArray(items: Item[], chosenTpl: string): Item | undefined;
protected createStaticLootItem(chosenTpl: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, parentId?: string): IContainerItem; protected createStaticLootItem(chosenTpl: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, parentId?: string): IContainerItem;
} }

View File

@ -9,7 +9,7 @@ import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/
import { LootItem } from "@spt/models/spt/services/LootItem"; import { LootItem } from "@spt/models/spt/services/LootItem";
import { LootRequest } from "@spt/models/spt/services/LootRequest"; import { LootRequest } from "@spt/models/spt/services/LootRequest";
import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ILogger } from "@spt/models/spt/utils/ILogger";
import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { ItemFilterService } from "@spt/services/ItemFilterService"; import { ItemFilterService } from "@spt/services/ItemFilterService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { RagfairLinkedItemService } from "@spt/services/RagfairLinkedItemService"; import { RagfairLinkedItemService } from "@spt/services/RagfairLinkedItemService";
@ -22,7 +22,7 @@ type ItemLimit = {
export declare class LootGenerator { export declare class LootGenerator {
protected logger: ILogger; protected logger: ILogger;
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected presetHelper: PresetHelper; protected presetHelper: PresetHelper;
@ -31,7 +31,7 @@ export declare class LootGenerator {
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected ragfairLinkedItemService: RagfairLinkedItemService; protected ragfairLinkedItemService: RagfairLinkedItemService;
protected itemFilterService: ItemFilterService; protected itemFilterService: ItemFilterService;
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); constructor(logger: ILogger, hashUtil: HashUtil, databaseService: DatabaseService, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService);
/** /**
* Generate a list of items based on configuration options parameter * Generate a list of items based on configuration options parameter
* @param options parameters to adjust how loot is generated * @param options parameters to adjust how loot is generated

View File

@ -3,7 +3,7 @@ import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig";
import { ConfigServer } from "@spt/servers/ConfigServer"; import { ConfigServer } from "@spt/servers/ConfigServer";
import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { ItemFilterService } from "@spt/services/ItemFilterService"; import { ItemFilterService } from "@spt/services/ItemFilterService";
import { RagfairPriceService } from "@spt/services/RagfairPriceService"; import { RagfairPriceService } from "@spt/services/RagfairPriceService";
import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService";
@ -13,7 +13,7 @@ import { SeasonalEventService } from "@spt/services/SeasonalEventService";
*/ */
export declare class PMCLootGenerator { export declare class PMCLootGenerator {
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected itemFilterService: ItemFilterService; protected itemFilterService: ItemFilterService;
protected ragfairPriceService: RagfairPriceService; protected ragfairPriceService: RagfairPriceService;
@ -24,7 +24,7 @@ export declare class PMCLootGenerator {
protected backpackLootPool: Record<string, number>; protected backpackLootPool: Record<string, number>;
protected pmcConfig: IPmcConfig; protected pmcConfig: IPmcConfig;
protected roubleTpl: string; protected roubleTpl: string;
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper); constructor(itemHelper: ItemHelper, databaseService: DatabaseService, configServer: ConfigServer, itemFilterService: ItemFilterService, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper);
/** /**
* Create an array of loot items a PMC can have in their pockets * Create an array of loot items a PMC can have in their pockets
* @returns string array of tpls * @returns string array of tpls

View File

@ -9,9 +9,9 @@ import { IBotType } from "@spt/models/eft/common/tables/IBotType";
import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig";
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 { DatabaseServer } from "@spt/servers/DatabaseServer";
import { SaveServer } from "@spt/servers/SaveServer"; import { SaveServer } from "@spt/servers/SaveServer";
import { BotLootCacheService } from "@spt/services/BotLootCacheService"; import { BotLootCacheService } from "@spt/services/BotLootCacheService";
import { DatabaseService } from "@spt/services/DatabaseService";
import { FenceService } from "@spt/services/FenceService"; import { FenceService } from "@spt/services/FenceService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { ICloner } from "@spt/utils/cloners/ICloner"; import { ICloner } from "@spt/utils/cloners/ICloner";
@ -20,7 +20,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil";
export declare class PlayerScavGenerator { export declare class PlayerScavGenerator {
protected logger: ILogger; protected logger: ILogger;
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected botGeneratorHelper: BotGeneratorHelper; protected botGeneratorHelper: BotGeneratorHelper;
@ -34,7 +34,7 @@ export declare class PlayerScavGenerator {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected playerScavConfig: IPlayerScavConfig; protected playerScavConfig: IPlayerScavConfig;
constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); constructor(logger: ILogger, randomUtil: RandomUtil, databaseService: DatabaseService, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner);
/** /**
* Update a player profile to include a new player scav profile * Update a player profile to include a new player scav profile
* @param sessionID session id to specify what profile is updated * @param sessionID session id to specify what profile is updated

View File

@ -13,8 +13,8 @@ import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/
import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; import { Dynamic, IArmorPlateBlacklistSettings, 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";
import { DatabaseServer } from "@spt/servers/DatabaseServer";
import { SaveServer } from "@spt/servers/SaveServer"; import { SaveServer } from "@spt/servers/SaveServer";
import { DatabaseService } from "@spt/services/DatabaseService";
import { FenceService } from "@spt/services/FenceService"; import { FenceService } from "@spt/services/FenceService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { RagfairOfferService } from "@spt/services/RagfairOfferService"; import { RagfairOfferService } from "@spt/services/RagfairOfferService";
@ -28,7 +28,7 @@ export declare class RagfairOfferGenerator {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected ragfairServerHelper: RagfairServerHelper; protected ragfairServerHelper: RagfairServerHelper;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected handbookHelper: HandbookHelper; protected handbookHelper: HandbookHelper;
@ -51,7 +51,7 @@ export declare class RagfairOfferGenerator {
}[]; }[];
/** Internal counter to ensure each offer created has a unique value for its intId property */ /** Internal counter to ensure each offer created has a unique value for its intId property */
protected offerCounter: number; protected offerCounter: number;
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, profileHelper: ProfileHelper, handbookHelper: HandbookHelper, botHelper: BotHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseService: DatabaseService, ragfairServerHelper: RagfairServerHelper, profileHelper: ProfileHelper, handbookHelper: HandbookHelper, botHelper: BotHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner);
/** /**
* Create a flea offer and store it in the Ragfair server offers array * Create a flea offer and store it in the Ragfair server offers array
* @param userID Owner of the offer * @param userID Owner of the offer

View File

@ -9,7 +9,7 @@ import { IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } f
import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool"; import { IQuestTypePool } from "@spt/models/spt/repeatable/IQuestTypePool";
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 { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { ICloner } from "@spt/utils/cloners/ICloner"; import { ICloner } from "@spt/utils/cloners/ICloner";
import { MathUtil } from "@spt/utils/MathUtil"; import { MathUtil } from "@spt/utils/MathUtil";
@ -19,7 +19,7 @@ export declare class RepeatableQuestGenerator {
protected logger: ILogger; protected logger: ILogger;
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected mathUtil: MathUtil; protected mathUtil: MathUtil;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected objectId: ObjectId; protected objectId: ObjectId;
@ -28,7 +28,7 @@ export declare class RepeatableQuestGenerator {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questConfig: IQuestConfig; protected questConfig: IQuestConfig;
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner);
/** /**
* This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json).
* It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest

View File

@ -7,7 +7,7 @@ import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IBaseQuestConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IBaseQuestConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt/models/spt/config/IQuestConfig";
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 { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { ItemFilterService } from "@spt/services/ItemFilterService"; import { ItemFilterService } from "@spt/services/ItemFilterService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService";
@ -19,7 +19,7 @@ export declare class RepeatableQuestRewardGenerator {
protected logger: ILogger; protected logger: ILogger;
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected mathUtil: MathUtil; protected mathUtil: MathUtil;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected presetHelper: PresetHelper; protected presetHelper: PresetHelper;
protected handbookHelper: HandbookHelper; protected handbookHelper: HandbookHelper;
@ -30,7 +30,7 @@ export declare class RepeatableQuestRewardGenerator {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected questConfig: IQuestConfig; protected questConfig: IQuestConfig;
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner);
/** /**
* Generate the reward for a mission. A reward can consist of * Generate the reward for a mission. A reward can consist of
* - Experience * - Experience

View File

@ -7,7 +7,7 @@ import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig";
import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices";
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 { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { ItemFilterService } from "@spt/services/ItemFilterService"; import { ItemFilterService } from "@spt/services/ItemFilterService";
import { RagfairPriceService } from "@spt/services/RagfairPriceService"; import { RagfairPriceService } from "@spt/services/RagfairPriceService";
import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService";
@ -22,7 +22,7 @@ export declare class ScavCaseRewardGenerator {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected presetHelper: PresetHelper; protected presetHelper: PresetHelper;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected ragfairPriceService: RagfairPriceService; protected ragfairPriceService: RagfairPriceService;
protected seasonalEventService: SeasonalEventService; protected seasonalEventService: SeasonalEventService;
protected itemFilterService: ItemFilterService; protected itemFilterService: ItemFilterService;
@ -30,7 +30,7 @@ export declare class ScavCaseRewardGenerator {
protected scavCaseConfig: IScavCaseConfig; protected scavCaseConfig: IScavCaseConfig;
protected dbItemsCache: ITemplateItem[]; protected dbItemsCache: ITemplateItem[];
protected dbAmmoItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[];
constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseService: DatabaseService, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer);
/** /**
* Create an array of rewards that will be given to the player upon completing their scav case build * Create an array of rewards that will be given to the player upon completing their scav case build
* @param recipeId recipe of the scav case craft * @param recipeId recipe of the scav case craft

View File

@ -23,5 +23,5 @@ export declare class ExternalInventoryMagGen implements IInventoryMagGen {
* @param weaponTpl Weapon to get mag for * @param weaponTpl Weapon to get mag for
* @returns tpl of magazine * @returns tpl of magazine
*/ */
protected getRandomExternalMagazineForInternalMagazineGun(weaponTpl: string, magazineBlacklist: string[]): ITemplateItem; protected getRandomExternalMagazineForInternalMagazineGun(weaponTpl: string, magazineBlacklist: string[]): ITemplateItem | undefined;
} }

View File

@ -3,20 +3,20 @@ import { Difficulty } from "@spt/models/eft/common/tables/IBotType";
import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig";
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 { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { ICloner } from "@spt/utils/cloners/ICloner"; import { ICloner } from "@spt/utils/cloners/ICloner";
import { RandomUtil } from "@spt/utils/RandomUtil"; import { RandomUtil } from "@spt/utils/RandomUtil";
export declare class BotDifficultyHelper { export declare class BotDifficultyHelper {
protected logger: ILogger; protected logger: ILogger;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected botHelper: BotHelper; protected botHelper: BotHelper;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected pmcConfig: IPmcConfig; protected pmcConfig: IPmcConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); constructor(logger: ILogger, databaseService: DatabaseService, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner);
/** /**
* Get a difficulty object modified to handle fighting other PMCs * Get a difficulty object modified to handle fighting other PMCs
* @param pmcType 'bear or 'usec' * @param pmcType 'bear or 'usec'

View File

@ -12,13 +12,13 @@ import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "@spt/mo
import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig";
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 { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { RandomUtil } from "@spt/utils/RandomUtil"; import { RandomUtil } from "@spt/utils/RandomUtil";
export declare class BotGeneratorHelper { export declare class BotGeneratorHelper {
protected logger: ILogger; protected logger: ILogger;
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected durabilityLimitsHelper: DurabilityLimitsHelper; protected durabilityLimitsHelper: DurabilityLimitsHelper;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected inventoryHelper: InventoryHelper; protected inventoryHelper: InventoryHelper;
@ -28,7 +28,7 @@ export declare class BotGeneratorHelper {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected botConfig: IBotConfig; protected botConfig: IBotConfig;
protected pmcConfig: IPmcConfig; protected pmcConfig: IPmcConfig;
constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, applicationContext: ApplicationContext, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, randomUtil: RandomUtil, databaseService: DatabaseService, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, applicationContext: ApplicationContext, localisationService: LocalisationService, configServer: ConfigServer);
/** /**
* Adds properties to an item * Adds properties to an item
* e.g. Repairable / HasHinge / Foldable / MaxDurability * e.g. Repairable / HasHinge / Foldable / MaxDurability
@ -50,24 +50,24 @@ export declare class BotGeneratorHelper {
* Get the chance for the weapon attachment or helmet equipment to be set as activated * Get the chance for the weapon attachment or helmet equipment to be set as activated
* @param botRole role of bot with weapon/helmet * @param botRole role of bot with weapon/helmet
* @param setting the setting of the weapon attachment/helmet equipment to be activated * @param setting the setting of the weapon attachment/helmet equipment to be activated
* @param defaultValue default value for the chance of activation if the botrole or bot equipment role is null * @param defaultValue default value for the chance of activation if the botrole or bot equipment role is undefined
* @returns Percent chance to be active * @returns Percent chance to be active
*/ */
protected getBotEquipmentSettingFromConfig(botRole: string, setting: keyof EquipmentFilters, defaultValue: number): number; protected getBotEquipmentSettingFromConfig(botRole: string | undefined, setting: keyof EquipmentFilters, defaultValue: number): number;
/** /**
* Create a repairable object for a weapon that containers durability + max durability properties * Create a repairable object for a weapon that containers durability + max durability properties
* @param itemTemplate weapon object being generated for * @param itemTemplate weapon object being generated for
* @param botRole type of bot being generated for * @param botRole type of bot being generated for
* @returns Repairable object * @returns Repairable object
*/ */
protected generateWeaponRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; protected generateWeaponRepairableProperties(itemTemplate: ITemplateItem, botRole?: string): Repairable;
/** /**
* Create a repairable object for an armor that containers durability + max durability properties * Create a repairable object for an armor that containers durability + max durability properties
* @param itemTemplate weapon object being generated for * @param itemTemplate weapon object being generated for
* @param botRole type of bot being generated for * @param botRole type of bot being generated for
* @returns Repairable object * @returns Repairable object
*/ */
protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole?: string): Repairable;
isWeaponModIncompatibleWithCurrentMods(itemsEquipped: Item[], tplToCheck: string, modSlot: string): IChooseRandomCompatibleModResult; isWeaponModIncompatibleWithCurrentMods(itemsEquipped: Item[], tplToCheck: string, modSlot: string): IChooseRandomCompatibleModResult;
/** /**
* Can item be added to another item without conflict * Can item be added to another item without conflict

View File

@ -4,16 +4,16 @@ import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/
import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig";
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 { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { RandomUtil } from "@spt/utils/RandomUtil"; import { RandomUtil } from "@spt/utils/RandomUtil";
export declare class BotHelper { export declare class BotHelper {
protected logger: ILogger; protected logger: ILogger;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected botConfig: IBotConfig; protected botConfig: IBotConfig;
protected pmcConfig: IPmcConfig; protected pmcConfig: IPmcConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, configServer: ConfigServer); constructor(logger: ILogger, databaseService: DatabaseService, randomUtil: RandomUtil, configServer: ConfigServer);
/** /**
* Get a template object for the specified botRole from bots.types db * Get a template object for the specified botRole from bots.types db
* @param role botRole to get template for * @param role botRole to get template for
@ -54,7 +54,7 @@ export declare class BotHelper {
* @param botEquipConfig bot equipment json * @param botEquipConfig bot equipment json
* @returns RandomisationDetails * @returns RandomisationDetails
*/ */
getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails; getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined;
/** /**
* Choose between sptBear and sptUsec at random based on the % defined in pmcConfig.isUsec * Choose between sptBear and sptUsec at random based on the % defined in pmcConfig.isUsec
* @returns pmc role * @returns pmc role

View File

@ -1,9 +1,9 @@
export declare class FindSlotResult { export declare class FindSlotResult {
success: boolean; success: boolean;
x: any; x?: number;
y: any; y?: number;
rotation: boolean; rotation: boolean;
constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); constructor(success?: boolean, x?: number, y?: number, rotation?: boolean);
} }
export declare class ContainerHelper { export declare class ContainerHelper {
/** /**

View File

@ -3,10 +3,12 @@ import { ISptCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/ISptComm
import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest";
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
import { ConfigServer } from "@spt/servers/ConfigServer"; import { ConfigServer } from "@spt/servers/ConfigServer";
import { LocalisationService } from "@spt/services/LocalisationService";
export declare class SptCommandoCommands implements IChatCommand { export declare class SptCommandoCommands implements IChatCommand {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected localisationService: LocalisationService;
protected sptCommands: ISptCommand[]; protected sptCommands: ISptCommand[];
constructor(configServer: ConfigServer, sptCommands: ISptCommand[]); constructor(configServer: ConfigServer, localisationService: LocalisationService, sptCommands: ISptCommand[]);
registerSptCommandoCommand(command: ISptCommand): void; registerSptCommandoCommand(command: ISptCommand): void;
getCommandHelp(command: string): string; getCommandHelp(command: string): string;
getCommandPrefix(): string; getCommandPrefix(): string;

View File

@ -5,7 +5,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper";
import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest";
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ILogger } from "@spt/models/spt/utils/ILogger";
import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { LocaleService } from "@spt/services/LocaleService"; import { LocaleService } from "@spt/services/LocaleService";
import { MailSendService } from "@spt/services/MailSendService"; import { MailSendService } from "@spt/services/MailSendService";
import { HashUtil } from "@spt/utils/HashUtil"; import { HashUtil } from "@spt/utils/HashUtil";
@ -16,7 +16,7 @@ export declare class TraderSptCommand implements ISptCommand {
protected presetHelper: PresetHelper; protected presetHelper: PresetHelper;
protected mailSendService: MailSendService; protected mailSendService: MailSendService;
protected localeService: LocaleService; protected localeService: LocaleService;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
/** /**
* Regex to account for all these cases: * Regex to account for all these cases:
* spt trader prapor rep 100 * spt trader prapor rep 100
@ -24,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand {
*/ */
private static commandRegex; private static commandRegex;
protected savedCommand: SavedCommand; protected savedCommand: SavedCommand;
constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseService: DatabaseService);
getCommand(): string; getCommand(): string;
getCommandHelp(): string; getCommandHelp(): string;
performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string;

View File

@ -15,14 +15,14 @@ export declare class DurabilityLimitsHelper {
* @param botRole Role of bot to get max durability for * @param botRole Role of bot to get max durability for
* @returns Max durability of weapon * @returns Max durability of weapon
*/ */
getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole?: string): number;
/** /**
* Get max durability value for armor based on bot role * Get max durability value for armor based on bot role
* @param itemTemplate Item to get max durability for * @param itemTemplate Item to get max durability for
* @param botRole Role of bot to get max durability for * @param botRole Role of bot to get max durability for
* @returns max durability * @returns max durability
*/ */
getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole?: string): number;
/** /**
* Get randomised current weapon durability by bot role * Get randomised current weapon durability by bot role
* @param itemTemplate Unused - Item to get current durability of * @param itemTemplate Unused - Item to get current durability of
@ -30,7 +30,7 @@ export declare class DurabilityLimitsHelper {
* @param maxDurability Max durability of weapon * @param maxDurability Max durability of weapon
* @returns Current weapon durability * @returns Current weapon durability
*/ */
getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string | undefined, maxDurability: number): number;
/** /**
* Get randomised current armor durability by bot role * Get randomised current armor durability by bot role
* @param itemTemplate Unused - Item to get current durability of * @param itemTemplate Unused - Item to get current durability of
@ -38,17 +38,17 @@ export declare class DurabilityLimitsHelper {
* @param maxDurability Max durability of armor * @param maxDurability Max durability of armor
* @returns Current armor durability * @returns Current armor durability
*/ */
getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string | undefined, maxDurability: number): number;
protected generateMaxWeaponDurability(botRole: string): number; protected generateMaxWeaponDurability(botRole?: string): number;
protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; protected generateMaxPmcArmorDurability(itemMaxDurability: number): number;
protected getLowestMaxWeaponFromConfig(botRole: string): number; protected getLowestMaxWeaponFromConfig(botRole?: string): number;
protected getHighestMaxWeaponDurabilityFromConfig(botRole: string): number; protected getHighestMaxWeaponDurabilityFromConfig(botRole?: string): number;
protected generateWeaponDurability(botRole: string, maxDurability: number): number; protected generateWeaponDurability(botRole: string | undefined, maxDurability: number): number;
protected generateArmorDurability(botRole: string, maxDurability: number): number; protected generateArmorDurability(botRole: string | undefined, maxDurability: number): number;
protected getMinWeaponDeltaFromConfig(botRole: string): number; protected getMinWeaponDeltaFromConfig(botRole?: string): number;
protected getMaxWeaponDeltaFromConfig(botRole: string): number; protected getMaxWeaponDeltaFromConfig(botRole?: string): number;
protected getMinArmorDeltaFromConfig(botRole: string): number; protected getMinArmorDeltaFromConfig(botRole?: string): number;
protected getMaxArmorDeltaFromConfig(botRole: string): number; protected getMaxArmorDeltaFromConfig(botRole?: string): number;
protected getMinArmorLimitPercentFromConfig(botRole: string): number; protected getMinArmorLimitPercentFromConfig(botRole?: string): number;
protected getMinWeaponLimitPercentFromConfig(botRole: string): number; protected getMinWeaponLimitPercentFromConfig(botRole?: string): number;
} }

View File

@ -2,7 +2,7 @@ import { Category } from "@spt/models/eft/common/tables/IHandbookBase";
import { Item } from "@spt/models/eft/common/tables/IItem"; import { Item } from "@spt/models/eft/common/tables/IItem";
import { IItemConfig } from "@spt/models/spt/config/IItemConfig"; import { IItemConfig } from "@spt/models/spt/config/IItemConfig";
import { ConfigServer } from "@spt/servers/ConfigServer"; import { ConfigServer } from "@spt/servers/ConfigServer";
import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { ICloner } from "@spt/utils/cloners/ICloner"; import { ICloner } from "@spt/utils/cloners/ICloner";
declare class LookupItem<T, I> { declare class LookupItem<T, I> {
readonly byId: Map<string, T>; readonly byId: Map<string, T>;
@ -15,13 +15,13 @@ export declare class LookupCollection {
constructor(); constructor();
} }
export declare class HandbookHelper { export declare class HandbookHelper {
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected itemConfig: IItemConfig; protected itemConfig: IItemConfig;
protected lookupCacheGenerated: boolean; protected lookupCacheGenerated: boolean;
protected handbookPriceCache: LookupCollection; protected handbookPriceCache: LookupCollection;
constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); constructor(databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner);
/** /**
* Create an in-memory cache of all items with associated handbook price in handbookPriceCache class * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class
*/ */
@ -29,7 +29,7 @@ export declare class HandbookHelper {
/** /**
* Get price from internal cache, if cache empty look up price directly in handbook (expensive) * Get price from internal cache, if cache empty look up price directly in handbook (expensive)
* If no values found, return 0 * If no values found, return 0
* @param tpl item tpl to look up price for * @param tpl Item tpl to look up price for
* @returns price in roubles * @returns price in roubles
*/ */
getTemplatePrice(tpl: string): number; getTemplatePrice(tpl: string): number;

View File

@ -15,7 +15,7 @@ import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig";
import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ILogger } from "@spt/models/spt/utils/ILogger";
import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder";
import { ConfigServer } from "@spt/servers/ConfigServer"; import { ConfigServer } from "@spt/servers/ConfigServer";
import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { PlayerService } from "@spt/services/PlayerService"; import { PlayerService } from "@spt/services/PlayerService";
import { ICloner } from "@spt/utils/cloners/ICloner"; import { ICloner } from "@spt/utils/cloners/ICloner";
@ -26,7 +26,7 @@ export declare class HideoutHelper {
protected logger: ILogger; protected logger: ILogger;
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected eventOutputHolder: EventOutputHolder; protected eventOutputHolder: EventOutputHolder;
protected httpResponse: HttpResponseUtil; protected httpResponse: HttpResponseUtil;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
@ -43,7 +43,7 @@ export declare class HideoutHelper {
static expeditionaryFuelTank: string; static expeditionaryFuelTank: string;
static maxSkillPoint: number; static maxSkillPoint: number;
protected hideoutConfig: IHideoutConfig; protected hideoutConfig: IHideoutConfig;
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseService: DatabaseService, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner);
/** /**
* Add production to profiles' Hideout.Production array * Add production to profiles' Hideout.Production array
* @param pmcData Profile to add production to * @param pmcData Profile to add production to
@ -202,7 +202,7 @@ export declare class HideoutHelper {
*/ */
protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number, isFoundInRaid: boolean): Upd; protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number, isFoundInRaid: boolean): Upd;
protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData, isGeneratorOn: boolean): void; protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData, isGeneratorOn: boolean): void;
protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production; protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production | undefined;
/** /**
* Add bitcoin object to btc production products array and set progress time * Add bitcoin object to btc production products array and set progress time
* @param btcProd Bitcoin production object * @param btcProd Bitcoin production object

View File

@ -10,8 +10,8 @@ import { IInRaidConfig } from "@spt/models/spt/config/IInRaidConfig";
import { ILostOnDeathConfig } from "@spt/models/spt/config/ILostOnDeathConfig"; import { ILostOnDeathConfig } from "@spt/models/spt/config/ILostOnDeathConfig";
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 { DatabaseServer } from "@spt/servers/DatabaseServer";
import { SaveServer } from "@spt/servers/SaveServer"; import { SaveServer } from "@spt/servers/SaveServer";
import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { ProfileFixerService } from "@spt/services/ProfileFixerService"; import { ProfileFixerService } from "@spt/services/ProfileFixerService";
import { ICloner } from "@spt/utils/cloners/ICloner"; import { ICloner } from "@spt/utils/cloners/ICloner";
@ -23,7 +23,7 @@ export declare class InRaidHelper {
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected inventoryHelper: InventoryHelper; protected inventoryHelper: InventoryHelper;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected questHelper: QuestHelper; protected questHelper: QuestHelper;
@ -35,7 +35,7 @@ export declare class InRaidHelper {
protected cloner: ICloner; protected cloner: ICloner;
protected lostOnDeathConfig: ILostOnDeathConfig; protected lostOnDeathConfig: ILostOnDeathConfig;
protected inRaidConfig: IInRaidConfig; protected inRaidConfig: IInRaidConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseService: DatabaseService, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner);
/** /**
* Lookup quest item loss from lostOnDeath config * Lookup quest item loss from lostOnDeath config
* @returns True if items should be removed from inventory * @returns True if items should be removed from inventory

View File

@ -5,7 +5,7 @@ import { InsuredItem } from "@spt/models/eft/common/tables/IBotBase";
import { Item, Repairable, Upd } from "@spt/models/eft/common/tables/IItem"; import { Item, Repairable, Upd } 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 { ILogger } from "@spt/models/spt/utils/ILogger"; import { ILogger } from "@spt/models/spt/utils/ILogger";
import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService";
import { ItemFilterService } from "@spt/services/ItemFilterService"; import { ItemFilterService } from "@spt/services/ItemFilterService";
import { LocaleService } from "@spt/services/LocaleService"; import { LocaleService } from "@spt/services/LocaleService";
@ -24,7 +24,7 @@ export declare class ItemHelper {
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected objectId: ObjectId; protected objectId: ObjectId;
protected mathUtil: MathUtil; protected mathUtil: MathUtil;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected handbookHelper: HandbookHelper; protected handbookHelper: HandbookHelper;
protected itemBaseClassService: ItemBaseClassService; protected itemBaseClassService: ItemBaseClassService;
protected itemFilterService: ItemFilterService; protected itemFilterService: ItemFilterService;
@ -33,7 +33,7 @@ export declare class ItemHelper {
protected compareUtil: CompareUtil; protected compareUtil: CompareUtil;
protected cloner: ICloner; protected cloner: ICloner;
protected readonly defaultInvalidBaseTypes: string[]; protected readonly defaultInvalidBaseTypes: string[];
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner);
/** /**
* This method will compare two items (with all its children) and see if the are equivalent. * This method will compare two items (with all its children) and see if the are equivalent.
* This method will NOT compare IDs on the items * This method will NOT compare IDs on the items
@ -258,7 +258,7 @@ export declare class ItemHelper {
* @param fastPanel Quick slot panel * @param fastPanel Quick slot panel
* @returns Item[] * @returns Item[]
*/ */
replaceIDs(originalItems: Item[], pmcData?: IPmcData | null, insuredItems?: InsuredItem[] | null, fastPanel?: any): Item[]; replaceIDs(originalItems: Item[], pmcData?: IPmcData, insuredItems?: InsuredItem[], fastPanel?: any): Item[];
/** /**
* Mark the passed in array of items as found in raid. * Mark the passed in array of items as found in raid.
* Modifies passed in items * Modifies passed in items
@ -287,9 +287,9 @@ export declare class ItemHelper {
* *
* @param item The item to be checked * @param item The item to be checked
* @param parent The parent of the item to be checked * @param parent The parent of the item to be checked
* @returns True if the item is actually moddable, false if it is not, and null if the check cannot be performed. * @returns True if the item is actually moddable, false if it is not, and undefined if the check cannot be performed.
*/ */
isRaidModdable(item: Item, parent: Item): boolean | null; isRaidModdable(item: Item, parent: Item): boolean | undefined;
/** /**
* Retrieves the main parent item for a given attachment item. * Retrieves the main parent item for a given attachment item.
* *
@ -304,9 +304,9 @@ export declare class ItemHelper {
* *
* @param itemId - The unique identifier of the item for which to find the main parent. * @param itemId - The unique identifier of the item for which to find the main parent.
* @param itemsMap - A Map containing item IDs mapped to their corresponding Item objects for quick lookup. * @param itemsMap - A Map containing item IDs mapped to their corresponding Item objects for quick lookup.
* @returns The Item object representing the top-most parent of the given item, or `null` if no such parent exists. * @returns The Item object representing the top-most parent of the given item, or `undefined` if no such parent exists.
*/ */
getAttachmentMainParent(itemId: string, itemsMap: Map<string, Item>): Item | null; getAttachmentMainParent(itemId: string, itemsMap: Map<string, Item>): Item | undefined;
/** /**
* Determines if an item is an attachment that is currently attached to it's parent item. * Determines if an item is an attachment that is currently attached to it's parent item.
* *
@ -327,9 +327,9 @@ export declare class ItemHelper {
* *
* @param itemId - The unique identifier of the item for which to find the equipment parent. * @param itemId - The unique identifier of the item for which to find the equipment parent.
* @param itemsMap - A Map containing item IDs mapped to their corresponding Item objects for quick lookup. * @param itemsMap - A Map containing item IDs mapped to their corresponding Item objects for quick lookup.
* @returns The Item object representing the equipment parent of the given item, or `null` if no such parent exists. * @returns The Item object representing the equipment parent of the given item, or `undefined` if no such parent exists.
*/ */
getEquipmentParent(itemId: string, itemsMap: Map<string, Item>): Item | null; getEquipmentParent(itemId: string, itemsMap: Map<string, Item>): Item | undefined;
/** /**
* Get the inventory size of an item * Get the inventory size of an item
* @param items Item with children * @param items Item with children
@ -342,7 +342,7 @@ export declare class ItemHelper {
* @param item Db item template to look up Cartridge filter values from * @param item Db item template to look up Cartridge filter values from
* @returns Caliber of cartridge * @returns Caliber of cartridge
*/ */
getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string | null; getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string | undefined;
/** /**
* Add cartridges to the ammo box with correct max stack sizes * Add cartridges to the ammo box with correct max stack sizes
* @param ammoBox Box to add cartridges to * @param ammoBox Box to add cartridges to
@ -396,7 +396,7 @@ export declare class ItemHelper {
* @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @param cartridgeWhitelist OPTIONAL whitelist for cartridges
* @returns Tpl of cartridge * @returns Tpl of cartridge
*/ */
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string | undefined;
/** /**
* Create a basic cartrige object * Create a basic cartrige object
* @param parentId container cartridges will be placed in * @param parentId container cartridges will be placed in
@ -419,6 +419,11 @@ export declare class ItemHelper {
* @returns Name of item * @returns Name of item
*/ */
getItemName(itemTpl: string): string; getItemName(itemTpl: string): string;
/**
* Get all item tpls with a desired base type
* @param desiredBaseType Item base type wanted
* @returns Array of tpls
*/
getItemTplsOfBaseType(desiredBaseType: string): string[]; getItemTplsOfBaseType(desiredBaseType: string): string[];
/** /**
* Add child slot items to an item, chooses random child item if multiple choices exist * Add child slot items to an item, chooses random child item if multiple choices exist
@ -433,9 +438,9 @@ export declare class ItemHelper {
* Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter
* @param possibleTpls Tpls to randomly choose from * @param possibleTpls Tpls to randomly choose from
* @param incompatibleModTpls Incompatible tpls to not allow * @param incompatibleModTpls Incompatible tpls to not allow
* @returns Chosen tpl or null * @returns Chosen tpl or undefined
*/ */
getCompatibleTplFromArray(possibleTpls: string[], incompatibleModTpls: Set<string>): string; getCompatibleTplFromArray(possibleTpls: string[], incompatibleModTpls: Set<string>): string | undefined;
/** /**
* Is the provided item._props.Slots._name property a plate slot * Is the provided item._props.Slots._name property a plate slot
* @param slotName Name of slot (_name) of Items Slot array * @param slotName Name of slot (_name) of Items Slot array

View File

@ -44,7 +44,7 @@ export declare class PresetHelper {
* @param templateId Item id to get preset for * @param templateId Item id to get preset for
* @returns Null if no default preset, otherwise IPreset * @returns Null if no default preset, otherwise IPreset
*/ */
getDefaultPreset(templateId: string): IPreset; getDefaultPreset(templateId: string): IPreset | undefined;
getBaseItemTpl(presetId: string): string; getBaseItemTpl(presetId: string): string;
/** /**
* Return the price of the preset for the given item tpl, or for the tpl itself if no preset exists * Return the price of the preset for the given item tpl, or for the tpl itself if no preset exists

View File

@ -97,13 +97,19 @@ export declare class ProfileHelper {
* @param sessionID Profile id to get * @param sessionID Profile id to get
* @returns ISptProfile object * @returns ISptProfile object
*/ */
getFullProfile(sessionID: string): ISptProfile; getFullProfile(sessionID: string): ISptProfile | undefined;
/** /**
* Get a PMC profile by its session id * Get a PMC profile by its session id
* @param sessionID Profile id to return * @param sessionID Profile id to return
* @returns IPmcData object * @returns IPmcData object
*/ */
getPmcProfile(sessionID: string): IPmcData; getPmcProfile(sessionID: string): IPmcData | undefined;
/**
* Is this user id the logged in player
* @param userId Id to test
* @returns True is the current player
*/
isPlayer(userId: string): boolean;
/** /**
* Get a full profiles scav-specific sub-profile * Get a full profiles scav-specific sub-profile
* @param sessionID Profiles id * @param sessionID Profiles id

View File

@ -8,13 +8,13 @@ import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData";
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";
import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { RagfairLinkedItemService } from "@spt/services/RagfairLinkedItemService"; import { RagfairLinkedItemService } from "@spt/services/RagfairLinkedItemService";
import { ICloner } from "@spt/utils/cloners/ICloner"; import { ICloner } from "@spt/utils/cloners/ICloner";
export declare class RagfairHelper { export declare class RagfairHelper {
protected logger: ILogger; protected logger: ILogger;
protected traderAssortHelper: TraderAssortHelper; protected traderAssortHelper: TraderAssortHelper;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected handbookHelper: HandbookHelper; protected handbookHelper: HandbookHelper;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected ragfairLinkedItemService: RagfairLinkedItemService; protected ragfairLinkedItemService: RagfairLinkedItemService;
@ -22,7 +22,7 @@ export declare class RagfairHelper {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseService: DatabaseService, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner);
/** /**
* Gets currency TAG from TPL * Gets currency TAG from TPL
* @param {string} currency * @param {string} currency

View File

@ -2,17 +2,17 @@ import { SellResult } from "@spt/models/eft/ragfair/IRagfairOffer";
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";
import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { RandomUtil } from "@spt/utils/RandomUtil"; import { RandomUtil } from "@spt/utils/RandomUtil";
import { TimeUtil } from "@spt/utils/TimeUtil"; import { TimeUtil } from "@spt/utils/TimeUtil";
export declare class RagfairSellHelper { export declare class RagfairSellHelper {
protected logger: ILogger; protected logger: ILogger;
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, configServer: ConfigServer); constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseService: DatabaseService, configServer: ConfigServer);
/** /**
* Get the percent chance to sell an item based on its average listed price vs player chosen listing price * Get the percent chance to sell an item based on its average listed price vs player chosen listing price
* @param averageOfferPriceRub Price of average offer in roubles * @param averageOfferPriceRub Price of average offer in roubles

View File

@ -7,9 +7,10 @@ import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig";
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";
import { DatabaseServer } from "@spt/servers/DatabaseServer";
import { SaveServer } from "@spt/servers/SaveServer"; import { SaveServer } from "@spt/servers/SaveServer";
import { DatabaseService } from "@spt/services/DatabaseService";
import { ItemFilterService } from "@spt/services/ItemFilterService"; import { ItemFilterService } from "@spt/services/ItemFilterService";
import { LocalisationService } from "@spt/services/LocalisationService";
import { MailSendService } from "@spt/services/MailSendService"; import { MailSendService } from "@spt/services/MailSendService";
import { ICloner } from "@spt/utils/cloners/ICloner"; import { ICloner } from "@spt/utils/cloners/ICloner";
import { RandomUtil } from "@spt/utils/RandomUtil"; import { RandomUtil } from "@spt/utils/RandomUtil";
@ -22,18 +23,19 @@ export declare class RagfairServerHelper {
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected traderHelper: TraderHelper; protected traderHelper: TraderHelper;
protected mailSendService: MailSendService; protected mailSendService: MailSendService;
protected localisationService: LocalisationService;
protected itemFilterService: ItemFilterService; protected itemFilterService: ItemFilterService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
protected questConfig: IQuestConfig; protected questConfig: IQuestConfig;
protected static goodsReturnedTemplate: string; protected static goodsReturnedTemplate: string;
constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, profileHelper: ProfileHelper, itemHelper: ItemHelper, traderHelper: TraderHelper, mailSendService: MailSendService, localisationService: LocalisationService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner);
/** /**
* Is item valid / on blacklist / quest item * Is item valid / on blacklist / quest item
* @param itemDetails * @param itemDetails
@ -58,12 +60,6 @@ export declare class RagfairServerHelper {
* @returns True if id was a trader * @returns True if id was a trader
*/ */
isTrader(traderId: string): boolean; isTrader(traderId: string): boolean;
/**
* Is this user id the logged in player
* @param userId Id to test
* @returns True is the current player
*/
isPlayer(userId: string): boolean;
/** /**
* Send items back to player * Send items back to player
* @param sessionID Player to send items to * @param sessionID Player to send items to

View File

@ -48,6 +48,12 @@ export declare class TraderAssortHelper {
* @returns a traders' assorts * @returns a traders' assorts
*/ */
getAssort(sessionId: string, traderId: string, flea?: boolean): ITraderAssort; getAssort(sessionId: string, traderId: string, flea?: boolean): ITraderAssort;
/**
* Given the blacklist provided, remove root items from assort
* @param assortToFilter Trader assort to modify
* @param itemsTplsToRemove Item TPLs the assort should not have
*/
protected removeItemsFromAssort(assortToFilter: ITraderAssort, itemsTplsToRemove: string[]): void;
/** /**
* Reset every traders root item `BuyRestrictionCurrent` property to 0 * Reset every traders root item `BuyRestrictionCurrent` property to 0
* @param assortItems Items to adjust * @param assortItems Items to adjust

View File

@ -5,12 +5,12 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { Item } from "@spt/models/eft/common/tables/IItem"; import { Item } from "@spt/models/eft/common/tables/IItem";
import { ProfileTraderTemplate } from "@spt/models/eft/common/tables/IProfileTemplate"; import { ProfileTraderTemplate } from "@spt/models/eft/common/tables/IProfileTemplate";
import { ITraderAssort, ITraderBase, LoyaltyLevel } from "@spt/models/eft/common/tables/ITrader"; import { ITraderAssort, ITraderBase, LoyaltyLevel } from "@spt/models/eft/common/tables/ITrader";
import { ISptProfile } from "@spt/models/eft/profile/ISptProfile";
import { Traders } from "@spt/models/enums/Traders"; import { Traders } from "@spt/models/enums/Traders";
import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig";
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 { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseServer } from "@spt/servers/DatabaseServer";
import { SaveServer } from "@spt/servers/SaveServer";
import { FenceService } from "@spt/services/FenceService"; import { FenceService } from "@spt/services/FenceService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { PlayerService } from "@spt/services/PlayerService"; import { PlayerService } from "@spt/services/PlayerService";
@ -19,7 +19,6 @@ import { TimeUtil } from "@spt/utils/TimeUtil";
export declare class TraderHelper { export declare class TraderHelper {
protected logger: ILogger; protected logger: ILogger;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected saveServer: SaveServer;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected handbookHelper: HandbookHelper; protected handbookHelper: HandbookHelper;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
@ -31,10 +30,10 @@ export declare class TraderHelper {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
/** Dictionary of item tpl and the highest trader sell rouble price */ /** Dictionary of item tpl and the highest trader sell rouble price */
protected highestTraderPriceItems: Record<string, number>; protected highestTraderPriceItems?: Record<string, number>;
/** Dictionary of item tpl and the highest trader buy back rouble price */ /** Dictionary of item tpl and the highest trader buy back rouble price */
protected highestTraderBuyPriceItems: Record<string, number>; protected highestTraderBuyPriceItems?: Record<string, number>;
constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, handbookHelper: HandbookHelper, itemHelper: ItemHelper, playerService: PlayerService, localisationService: LocalisationService, fenceService: FenceService, timeUtil: TimeUtil, randomUtil: RandomUtil, configServer: ConfigServer); constructor(logger: ILogger, databaseServer: DatabaseServer, profileHelper: ProfileHelper, handbookHelper: HandbookHelper, itemHelper: ItemHelper, playerService: PlayerService, localisationService: LocalisationService, fenceService: FenceService, timeUtil: TimeUtil, randomUtil: RandomUtil, configServer: ConfigServer);
/** /**
* Get a trader base object, update profile to reflect players current standing in profile * Get a trader base object, update profile to reflect players current standing in profile
* when trader not found in profile * when trader not found in profile
@ -42,7 +41,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; getTrader(traderID: string, sessionID: string): ITraderBase | undefined;
/** /**
* 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
@ -55,7 +54,7 @@ export declare class TraderHelper {
* @param assortId Id of assort to find * @param assortId Id of assort to find
* @returns Item object * @returns Item object
*/ */
getTraderAssortItemByAssortId(traderId: string, assortId: string): Item; getTraderAssortItemByAssortId(traderId: string, assortId: string): Item | undefined;
/** /**
* Reset a profiles trader data back to its initial state as seen by a level 1 player * Reset a profiles trader data back to its initial state as seen by a level 1 player
* Does NOT take into account different profile levels * Does NOT take into account different profile levels
@ -70,6 +69,12 @@ export declare class TraderHelper {
* @returns Standing value * @returns Standing value
*/ */
protected getStartingStanding(traderId: string, rawProfileTemplate: ProfileTraderTemplate): number; protected getStartingStanding(traderId: string, rawProfileTemplate: ProfileTraderTemplate): number;
/**
* Add an array of suit ids to a profiles suit array, no duplicates
* @param fullProfile Profile to add to
* @param suitIds Suit Ids to add
*/
protected addSuitsToProfile(fullProfile: ISptProfile, suitIds: string[]): void;
/** /**
* Alter a traders unlocked status * Alter a traders unlocked status
* @param traderId Trader to alter * @param traderId Trader to alter
@ -91,10 +96,16 @@ export declare class TraderHelper {
* @returns current standing + added standing (clamped if needed) * @returns current standing + added standing (clamped if needed)
*/ */
protected addStandingValuesTogether(currentStanding: number, standingToAdd: number): number; protected addStandingValuesTogether(currentStanding: number, standingToAdd: number): number;
/**
* iterate over a profiles traders and ensure they have the correct loyaltyLevel for the player
* @param sessionId Profile to check
*/
validateTraderStandingsAndPlayerLevelForProfile(sessionId: string): void;
/** /**
* Calculate traders level based on exp amount and increments level if over threshold * Calculate traders level based on exp amount and increments level if over threshold
* @param traderID trader to check standing of * Also validates and updates player level if not correct based on XP value
* @param pmcData profile to update trader in * @param traderID Trader to check standing of
* @param pmcData Profile to update trader in
*/ */
lvlUp(traderID: string, pmcData: IPmcData): void; lvlUp(traderID: string, pmcData: IPmcData): void;
/** /**
@ -108,7 +119,7 @@ export declare class TraderHelper {
* @param traderId Trader to look up * @param traderId Trader to look up
* @returns Time in seconds * @returns Time in seconds
*/ */
getTraderUpdateSeconds(traderId: string): number; getTraderUpdateSeconds(traderId: string): number | undefined;
getLoyaltyLevel(traderID: string, pmcData: IPmcData): LoyaltyLevel; getLoyaltyLevel(traderID: string, pmcData: IPmcData): LoyaltyLevel;
/** /**
* Store the purchase of an assort from a trader in the player profile * Store the purchase of an assort from a trader in the player profile
@ -140,7 +151,7 @@ export declare class TraderHelper {
* @param traderId Traders id * @param traderId Traders id
* @returns Traders key * @returns Traders key
*/ */
getTraderById(traderId: string): Traders; getTraderById(traderId: string): Traders | undefined;
/** /**
* Validates that the provided traderEnumValue exists in the Traders enum. If the value is valid, it returns the * Validates that the provided traderEnumValue exists in the Traders enum. If the value is valid, it returns the
* same enum value, effectively serving as a trader ID; otherwise, it logs an error and returns an empty string. * same enum value, effectively serving as a trader ID; otherwise, it logs an error and returns an empty string.

View File

@ -83,7 +83,7 @@ export interface Settings {
AggressorBonus: number; AggressorBonus: number;
} }
export interface IBan { export interface IBan {
type: BanType; banType: BanType;
dateTime: number; dateTime: number;
} }
export declare enum BanType { export declare enum BanType {
@ -163,7 +163,7 @@ export interface Common extends IBaseSkill {
export interface Mastering extends IBaseSkill { export interface Mastering extends IBaseSkill {
} }
export interface Stats { export interface Stats {
Eft: IEftStats; Eft?: IEftStats;
} }
export interface IEftStats { export interface IEftStats {
CarriedQuestItems: string[]; CarriedQuestItems: string[];

View File

@ -5,6 +5,8 @@ export interface IProfileTemplates {
"Left Behind": IProfileSides; "Left Behind": IProfileSides;
"Prepare To Escape": IProfileSides; "Prepare To Escape": IProfileSides;
"Edge Of Darkness": IProfileSides; "Edge Of Darkness": IProfileSides;
"Unheard": IProfileSides;
"Tournament": IProfileSides;
"SPT Developer": IProfileSides; "SPT Developer": IProfileSides;
"SPT Easy start": IProfileSides; "SPT Easy start": IProfileSides;
"SPT Zero to hero": IProfileSides; "SPT Zero to hero": IProfileSides;
@ -28,4 +30,10 @@ export interface ProfileTraderTemplate {
initialStanding: number; initialStanding: number;
initialSalesSum: number; initialSalesSum: number;
jaegerUnlocked: boolean; jaegerUnlocked: boolean;
/** How many days is usage of the flea blocked for upon profile creation */
fleaBlockedDays?: number;
/** What traders default to being locked on profile creation */
lockedByDefaultOverride?: string[];
/** What traders should have their clothing unlocked/purchased on creation */
purchaseAllClothingByDefaultForTrader?: string[];
} }

View File

@ -3,9 +3,9 @@ export interface ITemplateItem {
_id: string; _id: string;
_name: string; _name: string;
_parent: string; _parent: string;
_type: string; _type: ItemType;
_props: Props; _props: Props;
_proto: string; _proto?: string;
} }
export interface Props { export interface Props {
AllowSpawnOnLocations?: any[]; AllowSpawnOnLocations?: any[];
@ -529,3 +529,7 @@ export interface IShotsGroupSettings {
ShotRecoilRotationStrength: Ixyz; ShotRecoilRotationStrength: Ixyz;
StartShotIndex: number; StartShotIndex: number;
} }
export declare enum ItemType {
NODE = "Node",
ITEM = "Item"
}

View File

@ -1,3 +1,3 @@
export interface IGameModeRequestData { export interface IGameModeRequestData {
sessionMode: string | null; sessionMode: string | undefined;
} }

View File

@ -1,6 +1,6 @@
export interface IGetRaidTimeResponse { export interface IGetRaidTimeResponse {
RaidTimeMinutes: number; RaidTimeMinutes: number;
NewSurviveTimeSeconds: number; NewSurviveTimeSeconds?: number;
OriginalSurvivalTimeSeconds: number; OriginalSurvivalTimeSeconds: number;
ExitChanges: ExtractChange[]; ExitChanges: ExtractChange[];
} }

View File

@ -1,5 +1,5 @@
export interface INullResponseData { export interface INullResponseData {
err: number; err: number;
errmsg: any; errmsg: any;
data: null; data: undefined;
} }

View File

@ -4,7 +4,7 @@ export interface IAddItemsDirectRequest {
itemsWithModsToAdd: Item[][]; itemsWithModsToAdd: Item[][];
foundInRaid: boolean; foundInRaid: boolean;
/** Runs after EACH item with children is added */ /** Runs after EACH item with children is added */
callback: (buyCount: number) => void; callback?: (buyCount: number) => void;
/** Should sorting table be used when no space found in stash */ /** Should sorting table be used when no space found in stash */
useSortingTable: boolean; useSortingTable: boolean;
} }

View File

@ -86,7 +86,7 @@ export interface Dialogue {
export interface IUserDialogInfo { export interface IUserDialogInfo {
_id: string; _id: string;
aid: number; aid: number;
Info: IUserDialogDetails; Info?: IUserDialogDetails;
} }
export interface IUserDialogDetails { export interface IUserDialogDetails {
Nickname: string; Nickname: string;
@ -160,9 +160,14 @@ export interface DateTime {
time: string; time: string;
} }
export interface Spt { export interface Spt {
/** What version of SPT was this profile made with */
version: string; version: string;
/** What mods has this profile loaded at any point in time */
mods?: ModDetails[]; mods?: ModDetails[];
/** What gifts has this profile received and how many */
receivedGifts: ReceivedGift[]; receivedGifts: ReceivedGift[];
/** item TPLs blacklisted from being sold on flea for this profile */
blacklistedItemTpls?: string[];
} }
export interface ModDetails { export interface ModDetails {
name: string; name: string;

View File

@ -49,8 +49,8 @@ export declare enum WildSpawnTypeNumber {
SPIRITSPRING = 48, SPIRITSPRING = 48,
PMCBEAR = 49, PMCBEAR = 49,
PMCUSEC = 50, PMCUSEC = 50,
skier = 51, SKIER = 51,
peacemaker = 52, PEACEMAKER = 52,
SPTUSEC = 100, SPTUSEC = 100,
SPTBEAR = 101 SPTBEAR = 101
} }

View File

@ -0,0 +1,8 @@
import { IBotBase } from "@spt/models/eft/common/tables/IBotBase";
import { IBotCore } from "@spt/models/eft/common/tables/IBotCore";
import { IBotType } from "@spt/models/eft/common/tables/IBotType";
export interface IBots {
types: Record<string, IBotType>;
base: IBotBase;
core: IBotCore;
}

View File

@ -41,6 +41,8 @@ export interface IBotConfig extends IBaseConfig {
currencyStackSize: Record<string, Record<string, Record<string, number>>>; currencyStackSize: Record<string, Record<string, Record<string, number>>>;
/** Tpls for low profile gas blocks */ /** Tpls for low profile gas blocks */
lowProfileGasBlockTpls: string[]; lowProfileGasBlockTpls: string[];
/** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */
disableLootOnBotTypes: string[];
} }
/** Number of bots to generate and store in cache on raid start per bot type */ /** Number of bots to generate and store in cache on raid start per bot type */
export interface PresetBatch { export interface PresetBatch {

View File

@ -1,8 +1,6 @@
import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig";
export interface IInsuranceConfig extends IBaseConfig { export interface IInsuranceConfig extends IBaseConfig {
kind: "spt-insurance"; kind: "spt-insurance";
/** Insurance price multiplier */
insuranceMultiplier: Record<string, number>;
/** Chance item is returned as insurance, keyed by trader id */ /** Chance item is returned as insurance, keyed by trader id */
returnChancePercent: Record<string, number>; returnChancePercent: Record<string, number>;
/** Item slots that should never be returned as insurance */ /** Item slots that should never be returned as insurance */

View File

@ -40,5 +40,7 @@ export declare enum ProfileChangeEventType {
PROFILE_LEVEL = "ProfileLevel", PROFILE_LEVEL = "ProfileLevel",
SKILL_POINTS = "SkillPoints", SKILL_POINTS = "SkillPoints",
EXAMINE_ALL_ITEMS = "ExamineAllItems", EXAMINE_ALL_ITEMS = "ExamineAllItems",
UNLOCK_TRADER = "UnlockTrader" UNLOCK_TRADER = "UnlockTrader",
ASSORT_UNLOCK_RULE = "AssortmentUnlockRule",
HIDEOUT_AREA_LEVEL = "HideoutAreaLevel"
} }

View File

@ -0,0 +1,12 @@
import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea";
import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction";
import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase";
import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase";
import { IQteData } from "@spt/models/eft/hideout/IQteData";
export interface IHideout {
areas: IHideoutArea[];
production: IHideoutProduction[];
scavcase: IHideoutScavCase[];
settings: IHideoutSettingsBase;
qte: IQteData[];
}

View File

@ -6,12 +6,12 @@ export declare class ExhaustableArray<T> implements IExhaustableArray<T> {
private cloner; private cloner;
private pool; private pool;
constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner);
getRandomValue(): T; getRandomValue(): T | undefined;
getFirstValue(): T; getFirstValue(): T | undefined;
hasValues(): boolean; hasValues(): boolean;
} }
export interface IExhaustableArray<T> { export interface IExhaustableArray<T> {
getRandomValue(): T; getRandomValue(): T | undefined;
getFirstValue(): T; getFirstValue(): T | undefined;
hasValues(): boolean; hasValues(): boolean;
} }

View File

@ -1,58 +1,20 @@
import { IGlobals } from "@spt/models/eft/common/IGlobals"; import { IGlobals } from "@spt/models/eft/common/IGlobals";
import { IAchievement } from "@spt/models/eft/common/tables/IAchievement";
import { IBotBase } from "@spt/models/eft/common/tables/IBotBase";
import { IBotCore } from "@spt/models/eft/common/tables/IBotCore";
import { IBotType } from "@spt/models/eft/common/tables/IBotType";
import { ICustomizationItem } from "@spt/models/eft/common/tables/ICustomizationItem";
import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase";
import { IMatch } from "@spt/models/eft/common/tables/IMatch"; import { IMatch } from "@spt/models/eft/common/tables/IMatch";
import { IProfileTemplates } from "@spt/models/eft/common/tables/IProfileTemplate";
import { IQuest } from "@spt/models/eft/common/tables/IQuest";
import { IRepeatableQuestDatabase } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { ITrader } from "@spt/models/eft/common/tables/ITrader"; import { ITrader } from "@spt/models/eft/common/tables/ITrader";
import { IHideoutArea } from "@spt/models/eft/hideout/IHideoutArea"; import { IBots } from "@spt/models/spt/bots/IBots";
import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideout } from "@spt/models/spt/hideout/IHideout";
import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase";
import { IHideoutSettingsBase } from "@spt/models/eft/hideout/IHideoutSettingsBase";
import { IQteData } from "@spt/models/eft/hideout/IQteData";
import { IDefaultEquipmentPreset } from "@spt/models/eft/profile/ISptProfile";
import { ILocaleBase } from "@spt/models/spt/server/ILocaleBase"; import { ILocaleBase } from "@spt/models/spt/server/ILocaleBase";
import { ILocations } from "@spt/models/spt/server/ILocations"; import { ILocations } from "@spt/models/spt/server/ILocations";
import { IServerBase } from "@spt/models/spt/server/IServerBase"; import { IServerBase } from "@spt/models/spt/server/IServerBase";
import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase"; import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase";
import { ITemplates } from "@spt/models/spt/templates/ITemplates";
export interface IDatabaseTables { export interface IDatabaseTables {
bots?: { bots?: IBots;
types: Record<string, IBotType>; hideout?: IHideout;
base: IBotBase;
core: IBotCore;
};
hideout?: {
areas: IHideoutArea[];
production: IHideoutProduction[];
scavcase: IHideoutScavCase[];
settings: IHideoutSettingsBase;
qte: IQteData[];
};
locales?: ILocaleBase; locales?: ILocaleBase;
locations?: ILocations; locations?: ILocations;
match?: IMatch; match?: IMatch;
templates?: { templates?: ITemplates;
character: string[];
items: Record<string, ITemplateItem>;
quests: Record<string, IQuest>;
repeatableQuests: IRepeatableQuestDatabase;
handbook: IHandbookBase;
customization: Record<string, ICustomizationItem>;
/** The profile templates listed in the launcher on profile creation, split by account type (e.g. Standard) then side (e.g. bear/usec) */
profiles: IProfileTemplates;
/** Flea prices of items - gathered from online flea market dump */
prices: Record<string, number>;
/** Default equipment loadouts that show on main inventory screen */
defaultEquipmentPresets: IDefaultEquipmentPreset[];
/** Achievements */
achievements: IAchievement[];
};
traders?: Record<string, ITrader>; traders?: Record<string, ITrader>;
globals?: IGlobals; globals?: IGlobals;
server?: IServerBase; server?: IServerBase;

View File

@ -0,0 +1,24 @@
import { IAchievement } from "@spt/models/eft/common/tables/IAchievement";
import { ICustomizationItem } from "@spt/models/eft/common/tables/ICustomizationItem";
import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase";
import { IProfileTemplates } from "@spt/models/eft/common/tables/IProfileTemplate";
import { IQuest } from "@spt/models/eft/common/tables/IQuest";
import { IRepeatableQuestDatabase } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { IDefaultEquipmentPreset } from "@spt/models/eft/profile/ISptProfile";
export interface ITemplates {
character: string[];
items: Record<string, ITemplateItem>;
quests: Record<string, IQuest>;
repeatableQuests: IRepeatableQuestDatabase;
handbook: IHandbookBase;
customization: Record<string, ICustomizationItem>;
/** The profile templates listed in the launcher on profile creation, split by account type (e.g. Standard) then side (e.g. bear/usec) */
profiles: IProfileTemplates;
/** Flea prices of items - gathered from online flea market dump */
prices: Record<string, number>;
/** Default equipment loadouts that show on main inventory screen */
defaultEquipmentPresets: IDefaultEquipmentPreset[];
/** Achievements */
achievements: IAchievement[];
}

View File

@ -44,7 +44,7 @@ export declare class EventOutputHolder {
* @param pmcData Player profile * @param pmcData Player profile
* @returns dictionary of hideout productions * @returns dictionary of hideout productions
*/ */
protected getProductionsFromProfileAndFlagComplete(productions: Record<string, Productive>): Record<string, Productive>; protected getProductionsFromProfileAndFlagComplete(productions: Record<string, Productive>): Record<string, Productive> | undefined;
/** /**
* Required as continuous productions don't reset and stay at 100% completion but client thinks it hasn't started * Required as continuous productions don't reset and stay at 100% completion but client thinks it hasn't started
* @param productions Productions in a profile * @param productions Productions in a profile

View File

@ -44,6 +44,7 @@ export declare class SaveServer {
* @returns ISptProfile * @returns ISptProfile
*/ */
getProfile(sessionId: string): ISptProfile; getProfile(sessionId: string): ISptProfile;
profileExists(id: string): boolean;
/** /**
* Get all profiles from memory * Get all profiles from memory
* @returns Dictionary of ISptProfile * @returns Dictionary of ISptProfile

View File

@ -1,4 +1,5 @@
/// <reference types="node" /> /// <reference types="node" />
/// <reference types="node" />
import { IncomingMessage } from "http"; import { IncomingMessage } from "http";
import { WebSocket } from "ws"; import { WebSocket } from "ws";
import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper";
@ -20,7 +21,7 @@ export declare class SptWebSocketConnectionHandler implements IWebSocketConnecti
protected httpConfig: IHttpConfig; protected httpConfig: IHttpConfig;
protected webSockets: Map<string, WebSocket>; protected webSockets: Map<string, WebSocket>;
protected defaultNotification: IWsNotificationEvent; protected defaultNotification: IWsNotificationEvent;
protected websocketPingHandler: any; protected websocketPingHandler: NodeJS.Timeout | undefined;
constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, sptWebSocketMessageHandlers: ISptWebSocketMessageHandler[]); constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, sptWebSocketMessageHandlers: ISptWebSocketMessageHandler[]);
getSocketId(): string; getSocketId(): string;
getHookUrl(): string; getHookUrl(): string;

View File

@ -44,35 +44,35 @@ export declare class BotEquipmentFilterService {
* @param botEquipmentRole equipment role of bot to look up * @param botEquipmentRole equipment role of bot to look up
* @returns Dictionary of weapon type and their whitelisted scope types * @returns Dictionary of weapon type and their whitelisted scope types
*/ */
getBotWeaponSightWhitelist(botEquipmentRole: string): Record<string, string[]>; getBotWeaponSightWhitelist(botEquipmentRole: string): Record<string, string[]> | undefined;
/** /**
* Get an object that contains equipment and cartridge blacklists for a specified bot type * Get an object that contains equipment and cartridge blacklists for a specified bot type
* @param botRole Role of the bot we want the blacklist for * @param botRole Role of the bot we want the blacklist for
* @param playerLevel Level of the player * @param playerLevel Level of the player
* @returns EquipmentBlacklistDetails object * @returns EquipmentBlacklistDetails object
*/ */
getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails; getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined;
/** /**
* Get the whitelist for a specific bot type that's within the players level * Get the whitelist for a specific bot type that's within the players level
* @param botRole Bot type * @param botRole Bot type
* @param playerLevel Players level * @param playerLevel Players level
* @returns EquipmentFilterDetails object * @returns EquipmentFilterDetails object
*/ */
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails; protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined;
/** /**
* Retrieve item weighting adjustments from bot.json config based on bot level * Retrieve item weighting adjustments from bot.json config based on bot level
* @param botRole Bot type to get adjustments for * @param botRole Bot type to get adjustments for
* @param botLevel Level of bot * @param botLevel Level of bot
* @returns Weighting adjustments for bot items * @returns Weighting adjustments for bot items
*/ */
protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails; protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined;
/** /**
* Retrieve item weighting adjustments from bot.json config based on player level * Retrieve item weighting adjustments from bot.json config based on player level
* @param botRole Bot type to get adjustments for * @param botRole Bot type to get adjustments for
* @param playerlevel Level of bot * @param playerlevel Level of bot
* @returns Weighting adjustments for bot items * @returns Weighting adjustments for bot items
*/ */
protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails; protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined;
/** /**
* Filter bot equipment based on blacklist and whitelist from config/bot.json * Filter bot equipment based on blacklist and whitelist from config/bot.json
* Prioritizes whitelist first, if one is found blacklist is ignored * Prioritizes whitelist first, if one is found blacklist is ignored

View File

@ -79,7 +79,7 @@ export declare class BotLootCacheService {
*/ */
protected botRoleExistsInCache(botRole: string): boolean; protected botRoleExistsInCache(botRole: string): boolean;
/** /**
* If lootcache is null, init with empty property arrays * If lootcache is undefined, init with empty property arrays
* @param botRole Bot role to hydrate * @param botRole Bot role to hydrate
*/ */
protected initCacheForBotRole(botRole: string): void; protected initCacheForBotRole(botRole: string): void;

View File

@ -0,0 +1,113 @@
import { IGlobals } from "@spt/models/eft/common/IGlobals";
import { ILocation } from "@spt/models/eft/common/ILocation";
import { IAchievement } from "@spt/models/eft/common/tables/IAchievement";
import { ICustomizationItem } from "@spt/models/eft/common/tables/ICustomizationItem";
import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase";
import { IMatch } from "@spt/models/eft/common/tables/IMatch";
import { IProfileTemplates } from "@spt/models/eft/common/tables/IProfileTemplate";
import { IQuest } from "@spt/models/eft/common/tables/IQuest";
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { ITrader } from "@spt/models/eft/common/tables/ITrader";
import { IBots } from "@spt/models/spt/bots/IBots";
import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig";
import { IHideout } from "@spt/models/spt/hideout/IHideout";
import { IDatabaseTables } from "@spt/models/spt/server/IDatabaseTables";
import { ILocaleBase } from "@spt/models/spt/server/ILocaleBase";
import { ILocations } from "@spt/models/spt/server/ILocations";
import { IServerBase } from "@spt/models/spt/server/IServerBase";
import { ISettingsBase } from "@spt/models/spt/server/ISettingsBase";
import { ITemplates } from "@spt/models/spt/templates/ITemplates";
import { ILogger } from "@spt/models/spt/utils/ILogger";
import { DatabaseServer } from "@spt/servers/DatabaseServer";
import { LocalisationService } from "./LocalisationService";
export declare class DatabaseService {
protected logger: ILogger;
protected databaseServer: DatabaseServer;
protected localisationService: LocalisationService;
protected locationConfig: ILocationConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, localisationService: LocalisationService);
/**
* @returns assets/database/
*/
getTables(): IDatabaseTables;
/**
* @returns assets/database/bots/
*/
getBots(): IBots;
/**
* @returns assets/database/globals.json
*/
getGlobals(): IGlobals;
/**
* @returns assets/database/hideout/
*/
getHideout(): IHideout;
/**
* @returns assets/database/locales/
*/
getLocales(): ILocaleBase;
/**
* @returns assets/database/locations
*/
getLocations(): ILocations;
/**
* Get specific location by its Id
* @param locationId Desired trader id
* @returns assets/database/locations/
*/
getLocation(locationId: string): ILocation;
/**
* @returns assets/database/match/
*/
getMatch(): IMatch;
/**
* @returns assets/database/server.json
*/
getServer(): IServerBase;
/**
* @returns assets/database/settings.json
*/
getSettings(): ISettingsBase;
/**
* @returns assets/database/templates/
*/
getTemplates(): ITemplates;
/**
* @returns assets/database/templates/achievements.json
*/
getAchievements(): IAchievement[];
/**
* @returns assets/database/templates/customisation.json
*/
getCustomization(): Record<string, ICustomizationItem>;
/**
* @returns assets/database/templates/items.json
*/
getHandbook(): IHandbookBase;
/**
* @returns assets/database/templates/items.json
*/
getItems(): Record<string, ITemplateItem>;
/**
* @returns assets/database/templates/prices.json
*/
getPrices(): Record<string, number>;
/**
* @returns assets/database/templates/profiles.json
*/
getProfiles(): IProfileTemplates;
/**
* @returns assets/database/templates/items.json
*/
getQuests(): Record<string, IQuest>;
/**
* @returns assets/database/traders/
*/
getTraders(): Record<string, ITrader>;
/**
* Get specific trader by their Id
* @param traderId Desired trader id
* @returns assets/database/traders/
*/
getTrader(traderId: string): ITrader;
}

View File

@ -11,7 +11,7 @@ import { ICreateFenceAssortsResult } from "@spt/models/spt/fence/ICreateFenceAss
import { IFenceAssortGenerationValues, IGenerationAssortValues } from "@spt/models/spt/fence/IFenceAssortGenerationValues"; import { IFenceAssortGenerationValues, IGenerationAssortValues } from "@spt/models/spt/fence/IFenceAssortGenerationValues";
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 { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { ICloner } from "@spt/utils/cloners/ICloner"; import { ICloner } from "@spt/utils/cloners/ICloner";
import { RandomUtil } from "@spt/utils/RandomUtil"; import { RandomUtil } from "@spt/utils/RandomUtil";
@ -24,7 +24,7 @@ export declare class FenceService {
protected logger: ILogger; protected logger: ILogger;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected handbookHelper: HandbookHelper; protected handbookHelper: HandbookHelper;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected presetHelper: PresetHelper; protected presetHelper: PresetHelper;
@ -35,13 +35,13 @@ export declare class FenceService {
/** Time when some items in assort will be replaced */ /** Time when some items in assort will be replaced */
protected nextPartialRefreshTimestamp: number; protected nextPartialRefreshTimestamp: number;
/** Main assorts you see at all rep levels */ /** Main assorts you see at all rep levels */
protected fenceAssort: ITraderAssort; protected fenceAssort?: ITraderAssort;
/** Assorts shown on a separate tab when you max out fence rep */ /** Assorts shown on a separate tab when you max out fence rep */
protected fenceDiscountAssort: ITraderAssort; protected fenceDiscountAssort?: ITraderAssort;
/** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */
protected desiredAssortCounts: IFenceAssortGenerationValues; protected desiredAssortCounts: IFenceAssortGenerationValues;
protected fenceItemUpdCompareProperties: Set<string>; protected fenceItemUpdCompareProperties: Set<string>;
constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner);
/** /**
* Replace main fence assort with new assort * Replace main fence assort with new assort
* @param assort New assorts to replace old with * @param assort New assorts to replace old with
@ -56,12 +56,12 @@ export declare class FenceService {
* Get main fence assort * Get main fence assort
* @return ITraderAssort * @return ITraderAssort
*/ */
getMainFenceAssort(): ITraderAssort; getMainFenceAssort(): ITraderAssort | undefined;
/** /**
* Get discount fence assort * Get discount fence assort
* @return ITraderAssort * @return ITraderAssort
*/ */
getDiscountFenceAssort(): ITraderAssort; getDiscountFenceAssort(): ITraderAssort | undefined;
/** /**
* Replace high rep level fence assort with new assort * Replace high rep level fence assort with new assort
* @param discountAssort New assorts to replace old with * @param discountAssort New assorts to replace old with
@ -217,7 +217,7 @@ export declare class FenceService {
* @param itemsWithChildren Items to search through * @param itemsWithChildren Items to search through
* @returns Matching assort item * @returns Matching assort item
*/ */
protected getMatchingItem(rootItemBeingAdded: Item, itemDbDetails: ITemplateItem, itemsWithChildren: Item[][]): Item; protected getMatchingItem(rootItemBeingAdded: Item, itemDbDetails: ITemplateItem, itemsWithChildren: Item[][]): Item | undefined;
/** /**
* Should this item be forced into only 1 stack on fence * Should this item be forced into only 1 stack on fence
* @param existingItem Existing item from fence assort * @param existingItem Existing item from fence assort
@ -239,7 +239,7 @@ export declare class FenceService {
}>, itemTpl: string): { }>, itemTpl: string): {
current: number; current: number;
max: number; max: number;
}; } | undefined;
/** /**
* Find presets in base fence assort and add desired number to 'assorts' parameter * Find presets in base fence assort and add desired number to 'assorts' parameter
* @param desiredWeaponPresetsCount * @param desiredWeaponPresetsCount

View File

@ -36,13 +36,13 @@ export declare class GiftService {
* @param giftData Gift to send player * @param giftData Gift to send player
* @returns trader/user/system id * @returns trader/user/system id
*/ */
protected getSenderId(giftData: Gift): string; protected getSenderId(giftData: Gift): string | undefined;
/** /**
* Convert GiftSenderType into a dialog MessageType * Convert GiftSenderType into a dialog MessageType
* @param giftData Gift to send player * @param giftData Gift to send player
* @returns MessageType enum value * @returns MessageType enum value
*/ */
protected getMessageType(giftData: Gift): MessageType; protected getMessageType(giftData: Gift): MessageType | undefined;
/** /**
* Prapor sends gifts to player for first week after profile creation * Prapor sends gifts to player for first week after profile creation
* @param sessionId Player id * @param sessionId Player id

View File

@ -163,11 +163,11 @@ export declare class InsuranceService {
* @param traderId Trader item is insured with * @param traderId Trader item is insured with
* @returns price in roubles * @returns price in roubles
*/ */
getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: Item, traderId: string): number;
/** /**
* Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance.
* * @param sessionID Players id
* @returns The ID. * @returns The root item Id.
*/ */
getRootItemParentID(sessionID: string): string; getRootItemParentID(sessionID: string): string;
} }

View File

@ -1,6 +1,6 @@
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ILogger } from "@spt/models/spt/utils/ILogger";
import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
/** /**
* Cache the baseids for each item in the tiems db inside a dictionary * Cache the baseids for each item in the tiems db inside a dictionary
@ -8,11 +8,11 @@ import { LocalisationService } from "@spt/services/LocalisationService";
export declare class ItemBaseClassService { export declare class ItemBaseClassService {
protected logger: ILogger; protected logger: ILogger;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected itemBaseClassesCache: Record<string, string[]>; protected itemBaseClassesCache: Record<string, string[]>;
protected items: Record<string, ITemplateItem>; protected items: Record<string, ITemplateItem>;
protected cacheGenerated: boolean; protected cacheGenerated: boolean;
constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); constructor(logger: ILogger, localisationService: LocalisationService, databaseService: DatabaseService);
/** /**
* Create cache and store inside ItemBaseClassService * Create cache and store inside ItemBaseClassService
* Store a dict of an items tpl to the base classes it and its parents have * Store a dict of an items tpl to the base classes it and its parents have

View File

@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper";
import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper";
import { Item } from "@spt/models/eft/common/tables/IItem"; import { Item } from "@spt/models/eft/common/tables/IItem";
import { Dialogue, IUserDialogInfo, Message, MessageItems } from "@spt/models/eft/profile/ISptProfile"; import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile";
import { MessageType } from "@spt/models/enums/MessageType"; import { MessageType } from "@spt/models/enums/MessageType";
import { Traders } from "@spt/models/enums/Traders"; import { Traders } from "@spt/models/enums/Traders";
import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails";
@ -37,7 +37,7 @@ export declare class MailSendService {
* @param items Optional items to send to player * @param items Optional items to send to player
* @param maxStorageTimeSeconds Optional time to collect items before they expire * @param maxStorageTimeSeconds Optional time to collect items before they expire
*/ */
sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: Item[], maxStorageTimeSeconds?: any, systemData?: any, ragfair?: any): void; sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: Item[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void;
/** /**
* Send a message from an NPC (e.g. prapor) to the player with or without items * Send a message from an NPC (e.g. prapor) to the player with or without items
* @param sessionId The session ID to send the message to * @param sessionId The session ID to send the message to
@ -47,7 +47,7 @@ export declare class MailSendService {
* @param items Optional items to send to player * @param items Optional items to send to player
* @param maxStorageTimeSeconds Optional time to collect items before they expire * @param maxStorageTimeSeconds Optional time to collect items before they expire
*/ */
sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: Item[], maxStorageTimeSeconds?: any, systemData?: any, ragfair?: any): void; sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: Item[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void;
/** /**
* Send a message from SYSTEM to the player with or without items * Send a message from SYSTEM to the player with or without items
* @param sessionId The session ID to send the message to * @param sessionId The session ID to send the message to
@ -72,7 +72,7 @@ export declare class MailSendService {
* @param items Optional items to send to player * @param items Optional items to send to player
* @param maxStorageTimeSeconds Optional time to collect items before they expire * @param maxStorageTimeSeconds Optional time to collect items before they expire
*/ */
sendUserMessageToPlayer(sessionId: string, senderDetails: IUserDialogInfo, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; sendUserMessageToPlayer(sessionId: string, senderDetails: IUserDialogInfo, message: string, items?: Item[], maxStorageTimeSeconds?: number): void;
/** /**
* Large function to send messages to players from a variety of sources (SYSTEM/NPC/USER) * Large function to send messages to players from a variety of sources (SYSTEM/NPC/USER)
* Helper functions in this class are available to simplify common actions * Helper functions in this class are available to simplify common actions
@ -99,7 +99,7 @@ export declare class MailSendService {
* @param itemsToSendToPlayer Items to add to message * @param itemsToSendToPlayer Items to add to message
* @param maxStorageTimeSeconds total time items are stored in mail before being deleted * @param maxStorageTimeSeconds total time items are stored in mail before being deleted
*/ */
protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems, maxStorageTimeSeconds: number): void; protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void;
/** /**
* perform various sanitising actions on the items before they're considered ready for insertion into message * perform various sanitising actions on the items before they're considered ready for insertion into message
* @param dialogType The type of the dialog that will hold the reward items being processed * @param dialogType The type of the dialog that will hold the reward items being processed
@ -125,5 +125,5 @@ export declare class MailSendService {
* @param messageDetails * @param messageDetails
* @returns gets an id of the individual sending it * @returns gets an id of the individual sending it
*/ */
protected getMessageSenderIdByType(messageDetails: ISendMessageDetails): string; protected getMessageSenderIdByType(messageDetails: ISendMessageDetails): string | undefined;
} }

View File

@ -84,5 +84,5 @@ export declare class PaymentService {
* @param playerStashId Players stash id * @param playerStashId Players stash id
* @returns true if its in inventory * @returns true if its in inventory
*/ */
protected isInStash(itemId: string, inventoryItems: Item[], playerStashId: string): boolean; protected isInStash(itemId: string | undefined, inventoryItems: Item[], playerStashId: string): boolean;
} }

View File

@ -41,7 +41,7 @@ export declare class PmcChatResponseService {
* @param pmcData Player profile * @param pmcData Player profile
* @returns Message from PMC to player * @returns Message from PMC to player
*/ */
protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string; protected chooseMessage(isVictim: boolean, pmcData: IPmcData): string | undefined;
/** /**
* 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

View File

@ -14,7 +14,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig";
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";
import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { ICloner } from "@spt/utils/cloners/ICloner"; import { ICloner } from "@spt/utils/cloners/ICloner";
import { HashUtil } from "@spt/utils/HashUtil"; import { HashUtil } from "@spt/utils/HashUtil";
@ -24,6 +24,7 @@ import { Watermark } from "@spt/utils/Watermark";
export declare class ProfileFixerService { export declare class ProfileFixerService {
protected logger: ILogger; protected logger: ILogger;
protected watermark: Watermark; protected watermark: Watermark;
protected databaseService: DatabaseService;
protected hideoutHelper: HideoutHelper; protected hideoutHelper: HideoutHelper;
protected inventoryHelper: InventoryHelper; protected inventoryHelper: InventoryHelper;
protected traderHelper: TraderHelper; protected traderHelper: TraderHelper;
@ -33,12 +34,11 @@ export declare class ProfileFixerService {
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected jsonUtil: JsonUtil; protected jsonUtil: JsonUtil;
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected databaseServer: DatabaseServer;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected cloner: ICloner; protected cloner: ICloner;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); constructor(logger: ILogger, watermark: Watermark, databaseService: DatabaseService, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, configServer: ConfigServer, cloner: ICloner);
/** /**
* Find issues in the pmc profile data that may cause issues and fix them * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -115,7 +115,7 @@ export declare class ProfileFixerService {
* @param bonus bonus to find * @param bonus bonus to find
* @returns matching bonus * @returns matching bonus
*/ */
protected getBonusFromProfile(profileBonuses: Bonus[], bonus: StageBonus): Bonus; protected getBonusFromProfile(profileBonuses: Bonus[], bonus: StageBonus): Bonus | undefined;
/** /**
* Checks profile inventiory for items that do not exist inside the items db * Checks profile inventiory for items that do not exist inside the items db
* @param sessionId Session id * @param sessionId Session id
@ -187,7 +187,7 @@ export declare class ProfileFixerService {
protected removeOrphanedQuests(pmcProfile: IPmcData): void; protected removeOrphanedQuests(pmcProfile: IPmcData): void;
/** /**
* If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value
* Resolve this by setting the nextResupply to 0 if it's null * Resolve this by setting the nextResupply to 0 if it's undefined
*/ */
protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; protected fixNullTraderNextResupply(pmcProfile: IPmcData): void;
} }

View File

@ -15,7 +15,7 @@ export declare class ProfileSnapshotService {
* @param sessionID key * @param sessionID key
* @returns A player profile object * @returns A player profile object
*/ */
getProfileSnapshot(sessionID: string): ISptProfile; getProfileSnapshot(sessionID: string): ISptProfile | undefined;
/** /**
* Does a profile exists against the provided key * Does a profile exists against the provided key
* @param sessionID key * @param sessionID key

View File

@ -34,8 +34,8 @@ export declare class RagfairOfferService {
* @returns IRagfairOffer array * @returns IRagfairOffer array
*/ */
getOffers(): IRagfairOffer[]; getOffers(): IRagfairOffer[];
getOfferByOfferId(offerId: string): IRagfairOffer; getOfferByOfferId(offerId: string): IRagfairOffer | undefined;
getOffersOfType(templateId: string): IRagfairOffer[]; getOffersOfType(templateId: string): IRagfairOffer[] | undefined;
addOffer(offer: IRagfairOffer): void; addOffer(offer: IRagfairOffer): void;
addOfferToExpired(staleOffer: IRagfairOffer): void; addOfferToExpired(staleOffer: IRagfairOffer): void;
/** /**

View File

@ -56,5 +56,5 @@ export declare class RaidTimeAdjustmentService {
* @param newRaidTimeMinutes How long raid is in minutes * @param newRaidTimeMinutes How long raid is in minutes
* @returns List of exit changes to send to client * @returns List of exit changes to send to client
*/ */
protected getExitAdjustments(mapBase: ILocationBase, newRaidTimeMinutes: number): ExtractChange[]; protected getExitAdjustments(mapBase: ILocationBase, newRaidTimeMinutes: number): ExtractChange[] | undefined;
} }

View File

@ -10,13 +10,13 @@ import { ISeasonalEvent, ISeasonalEventConfig } from "@spt/models/spt/config/ISe
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";
import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { GiftService } from "@spt/services/GiftService"; import { GiftService } from "@spt/services/GiftService";
import { LocalisationService } from "@spt/services/LocalisationService"; import { LocalisationService } from "@spt/services/LocalisationService";
import { DatabaseImporter } from "@spt/utils/DatabaseImporter"; import { DatabaseImporter } from "@spt/utils/DatabaseImporter";
export declare class SeasonalEventService { export declare class SeasonalEventService {
protected logger: ILogger; protected logger: ILogger;
protected databaseServer: DatabaseServer; protected databaseService: DatabaseService;
protected databaseImporter: DatabaseImporter; protected databaseImporter: DatabaseImporter;
protected giftService: GiftService; protected giftService: GiftService;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
@ -27,11 +27,11 @@ export declare class SeasonalEventService {
protected questConfig: IQuestConfig; protected questConfig: IQuestConfig;
protected httpConfig: IHttpConfig; protected httpConfig: IHttpConfig;
protected weatherConfig: IWeatherConfig; protected weatherConfig: IWeatherConfig;
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: SeasonalEventType[];
constructor(logger: ILogger, databaseServer: DatabaseServer, 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[];
/** /**

View File

@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService {
* @param traderId Trader to loop up purchases for * @param traderId Trader to loop up purchases for
* @returns Dict of assort id and count purchased * @returns Dict of assort id and count purchased
*/ */
getProfileTraderPurchases(sessionId: string, traderId: string): Record<string, TraderPurchaseData>; getProfileTraderPurchases(sessionId: string, traderId: string): Record<string, TraderPurchaseData> | undefined;
/** /**
* Get a purchase made from a trader for requested profile before the last trader reset * Get a purchase made from a trader for requested profile before the last trader reset
* @param sessionId Session id * @param sessionId Session id
@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService {
* @param assortId Id of assort to get data for * @param assortId Id of assort to get data for
* @returns TraderPurchaseData * @returns TraderPurchaseData
*/ */
getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData; getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined;
/** /**
* Remove all trader purchase records from all profiles that exist * Remove all trader purchase records from all profiles that exist
* @param traderId Traders id * @param traderId Traders id

View File

@ -1,21 +1,19 @@
import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem";
import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails";
import { IDatabaseTables } from "@spt/models/spt/server/IDatabaseTables";
import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ILogger } from "@spt/models/spt/utils/ILogger";
import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { DatabaseService } from "@spt/services/DatabaseService";
import { ItemBaseClassService } from "@spt/services/ItemBaseClassService"; import { ItemBaseClassService } from "@spt/services/ItemBaseClassService";
import { ICloner } from "@spt/utils/cloners/ICloner"; import { ICloner } from "@spt/utils/cloners/ICloner";
import { HashUtil } from "@spt/utils/HashUtil"; import { HashUtil } from "@spt/utils/HashUtil";
export declare class CustomItemService { export declare class CustomItemService {
protected logger: ILogger; protected logger: ILogger;
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseService;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected itemBaseClassService: ItemBaseClassService; protected itemBaseClassService: ItemBaseClassService;
protected cloner: ICloner; protected cloner: ICloner;
protected tables: IDatabaseTables; constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseService, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner);
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner);
/** /**
* Create a new item from a cloned item base * Create a new item from a cloned item base
* WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start

View File

@ -22,8 +22,8 @@ export declare class HttpResponseUtil {
* @param errmsg * @param errmsg
* @returns * @returns
*/ */
getBody<T>(data: T, err?: number, errmsg?: any, sanitize?: boolean): IGetBodyResponseData<T>; getBody<T>(data: T, err?: number, errmsg?: string, sanitize?: boolean): IGetBodyResponseData<T>;
getUnclearedBody(data: any, err?: number, errmsg?: any): string; getUnclearedBody(data: any, err?: number, errmsg?: string): string;
emptyResponse(): IGetBodyResponseData<string>; emptyResponse(): IGetBodyResponseData<string>;
nullResponse(): INullResponseData; nullResponse(): INullResponseData;
emptyArrayResponse(): IGetBodyResponseData<any[]>; emptyArrayResponse(): IGetBodyResponseData<any[]>;

View File

@ -6,7 +6,7 @@ export declare class JsonUtil {
protected vfs: VFS; protected vfs: VFS;
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected logger: ILogger; protected logger: ILogger;
protected fileHashes: any; protected fileHashes?: Map<string, string>;
protected jsonCacheExists: boolean; protected jsonCacheExists: boolean;
protected jsonCachePath: string; protected jsonCachePath: string;
constructor(vfs: VFS, hashUtil: HashUtil, logger: ILogger); constructor(vfs: VFS, hashUtil: HashUtil, logger: ILogger);
@ -32,15 +32,15 @@ export declare class JsonUtil {
* @param options Stringify options or a replacer. * @param options Stringify options or a replacer.
* @returns The string converted from the JavaScript value * @returns The string converted from the JavaScript value
*/ */
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string; serializeJsonC(data: any, filename?: string | undefined, options?: IStringifyOptions | Reviver): string | undefined;
serializeJson5(data: any, filename?: string | null, prettify?: boolean): string; serializeJson5(data: any, filename?: string | undefined, prettify?: boolean): string | undefined;
/** /**
* From string to object * From string to object
* @param jsonString json string to turn into object * @param jsonString json string to turn into object
* @param filename Name of file being deserialized * @param filename Name of file being deserialized
* @returns object * @returns object
*/ */
deserialize<T>(jsonString: string, filename?: string): T; deserialize<T>(jsonString: string, filename?: string): T | undefined;
/** /**
* From string to object * From string to object
* @param jsonString json string to turn into object * @param jsonString json string to turn into object
@ -48,16 +48,16 @@ export declare class JsonUtil {
* @param options Parsing options * @param options Parsing options
* @returns object * @returns object
*/ */
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T; deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T | undefined;
deserializeJson5<T>(jsonString: string, filename?: string): T; deserializeJson5<T>(jsonString: string, filename?: string): T | undefined;
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>; deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T | undefined>;
/** /**
* From json string to object * From json string to object
* @param jsonString String to turn into object * @param jsonString String to turn into object
* @param filePath Path to json file being processed * @param filePath Path to json file being processed
* @returns Object * @returns Object
*/ */
deserializeWithCacheCheck<T>(jsonString: string, filePath: string): T; deserializeWithCacheCheck<T>(jsonString: string, filePath: string): T | undefined;
/** /**
* Create file if nothing found * Create file if nothing found
* @param jsonCachePath path to cache * @param jsonCachePath path to cache

View File

@ -49,5 +49,5 @@ export declare class MathUtil {
* @param {array} y support points in y (of same length as x) * @param {array} y support points in y (of same length as x)
* @return {number} y(xp) * @return {number} y(xp)
*/ */
interp1(xp: number, x: number[], y: number[]): number; interp1(xp: number, x: number[], y: number[]): number | undefined;
} }

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