mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-12 22:30:43 -05:00
Updated interfaces to follow correct naming scheme
This commit is contained in:
parent
b0159e6427
commit
776f925d91
@ -31,7 +31,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"
|
|||||||
import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData";
|
import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData";
|
||||||
import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData";
|
import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData";
|
||||||
import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile";
|
import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||||
import { HashUtil } from "@spt/utils/HashUtil";
|
import { HashUtil } from "@spt/utils/HashUtil";
|
||||||
import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil";
|
||||||
import { TimeUtil } from "@spt/utils/TimeUtil";
|
import { TimeUtil } from "@spt/utils/TimeUtil";
|
||||||
@ -87,7 +87,7 @@ export class DialogueCallbacks implements OnUpdate {
|
|||||||
url: string,
|
url: string,
|
||||||
info: IGetMailDialogListRequestData,
|
info: IGetMailDialogListRequestData,
|
||||||
sessionID: string,
|
sessionID: string,
|
||||||
): IGetBodyResponseData<DialogueInfo[]> {
|
): IGetBodyResponseData<IDialogueInfo[]> {
|
||||||
return this.httpResponse.getBody(this.dialogueController.generateDialogueList(sessionID), 0, undefined, false);
|
return this.httpResponse.getBody(this.dialogueController.generateDialogueList(sessionID), 0, undefined, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ export class DialogueCallbacks implements OnUpdate {
|
|||||||
url: string,
|
url: string,
|
||||||
info: IGetMailDialogInfoRequestData,
|
info: IGetMailDialogInfoRequestData,
|
||||||
sessionID: string,
|
sessionID: string,
|
||||||
): IGetBodyResponseData<DialogueInfo> {
|
): IGetBodyResponseData<IDialogueInfo> {
|
||||||
return this.httpResponse.getBody(this.dialogueController.getDialogueInfo(info.dialogId, sessionID));
|
return this.httpResponse.getBody(this.dialogueController.getDialogueInfo(info.dialogId, sessionID));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData";
|
|||||||
import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader";
|
import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader";
|
||||||
import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
import { ITraderConfig, ModdedTraders } from "@spt/models/spt/config/ITraderConfig";
|
import { IModdedTraders, ITraderConfig } from "@spt/models/spt/config/ITraderConfig";
|
||||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil";
|
||||||
import { inject, injectable } from "tsyringe";
|
import { inject, injectable } from "tsyringe";
|
||||||
@ -56,7 +56,7 @@ export class TraderCallbacks implements OnLoad, OnUpdate {
|
|||||||
url: string,
|
url: string,
|
||||||
info: IEmptyRequestData,
|
info: IEmptyRequestData,
|
||||||
sessionID: string,
|
sessionID: string,
|
||||||
): IGetBodyResponseData<ModdedTraders> {
|
): IGetBodyResponseData<IModdedTraders> {
|
||||||
const traderConfig = this.configServer.getConfig(ConfigTypes.TRADER) as ITraderConfig;
|
const traderConfig = this.configServer.getConfig(ConfigTypes.TRADER) as ITraderConfig;
|
||||||
return this.httpResponse.noBody(traderConfig.moddedTraders);
|
return this.httpResponse.noBody(traderConfig.moddedTraders);
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaid
|
|||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
import { SideType } from "@spt/models/enums/SideType";
|
import { SideType } from "@spt/models/enums/SideType";
|
||||||
import { WildSpawnTypeNumber } from "@spt/models/enums/WildSpawnTypeNumber";
|
import { WildSpawnTypeNumber } from "@spt/models/enums/WildSpawnTypeNumber";
|
||||||
import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
||||||
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
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";
|
||||||
@ -245,7 +245,7 @@ export class BotController {
|
|||||||
raidSettings: IGetRaidConfigurationRequestData,
|
raidSettings: IGetRaidConfigurationRequestData,
|
||||||
botCountToGenerate: number,
|
botCountToGenerate: number,
|
||||||
generateAsPmc: boolean,
|
generateAsPmc: boolean,
|
||||||
): BotGenerationDetails {
|
): IBotGenerationDetails {
|
||||||
return {
|
return {
|
||||||
isPmc: generateAsPmc,
|
isPmc: generateAsPmc,
|
||||||
side: generateAsPmc ? this.botHelper.getPmcSideByRole(condition.Role) : SideType.SAVAGE,
|
side: generateAsPmc ? this.botHelper.getPmcSideByRole(condition.Role) : SideType.SAVAGE,
|
||||||
@ -280,7 +280,7 @@ export class BotController {
|
|||||||
*/
|
*/
|
||||||
protected async generateWithBotDetails(
|
protected async generateWithBotDetails(
|
||||||
condition: ICondition,
|
condition: ICondition,
|
||||||
botGenerationDetails: BotGenerationDetails,
|
botGenerationDetails: IBotGenerationDetails,
|
||||||
sessionId: string,
|
sessionId: string,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const isEventBot = condition.Role.toLowerCase().includes("event");
|
const isEventBot = condition.Role.toLowerCase().includes("event");
|
||||||
@ -328,7 +328,7 @@ export class BotController {
|
|||||||
* @returns A promise for the bot to be stored
|
* @returns A promise for the bot to be stored
|
||||||
*/
|
*/
|
||||||
protected async generateSingleBotAndStoreInCache(
|
protected async generateSingleBotAndStoreInCache(
|
||||||
botGenerationDetails: BotGenerationDetails,
|
botGenerationDetails: IBotGenerationDetails,
|
||||||
sessionId: string,
|
sessionId: string,
|
||||||
cacheKey: string,
|
cacheKey: string,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
@ -450,7 +450,7 @@ export class BotController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected updateBotGenerationDetailsToRandomBoss(
|
protected updateBotGenerationDetailsToRandomBoss(
|
||||||
botGenerationDetails: BotGenerationDetails,
|
botGenerationDetails: IBotGenerationDetails,
|
||||||
possibleBossTypeWeights: Record<string, number>,
|
possibleBossTypeWeights: Record<string, number>,
|
||||||
): void {
|
): void {
|
||||||
// Seems Actual bosses have the same Brain issues like PMC gaining Boss Brains We cant use all bosses
|
// Seems Actual bosses have the same Brain issues like PMC gaining Boss Brains We cant use all bosses
|
||||||
|
@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis
|
|||||||
import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData";
|
import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData";
|
||||||
import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData";
|
import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData";
|
||||||
import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest";
|
import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest";
|
||||||
import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile";
|
import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
import { MessageType } from "@spt/models/enums/MessageType";
|
import { MessageType } from "@spt/models/enums/MessageType";
|
||||||
import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig";
|
import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig";
|
||||||
@ -78,8 +78,8 @@ export class DialogueController {
|
|||||||
* @param sessionID Session Id
|
* @param sessionID Session Id
|
||||||
* @returns array of dialogs
|
* @returns array of dialogs
|
||||||
*/
|
*/
|
||||||
public generateDialogueList(sessionID: string): DialogueInfo[] {
|
public generateDialogueList(sessionID: string): IDialogueInfo[] {
|
||||||
const data: DialogueInfo[] = [];
|
const data: IDialogueInfo[] = [];
|
||||||
for (const dialogueId in this.dialogueHelper.getDialogsForProfile(sessionID)) {
|
for (const dialogueId in this.dialogueHelper.getDialogsForProfile(sessionID)) {
|
||||||
data.push(this.getDialogueInfo(dialogueId, sessionID));
|
data.push(this.getDialogueInfo(dialogueId, sessionID));
|
||||||
}
|
}
|
||||||
@ -93,11 +93,11 @@ export class DialogueController {
|
|||||||
* @param sessionID Session Id
|
* @param sessionID Session Id
|
||||||
* @returns DialogueInfo
|
* @returns DialogueInfo
|
||||||
*/
|
*/
|
||||||
public getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo {
|
public getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo {
|
||||||
const dialogs = this.dialogueHelper.getDialogsForProfile(sessionID);
|
const dialogs = this.dialogueHelper.getDialogsForProfile(sessionID);
|
||||||
const dialogue = dialogs[dialogueID];
|
const dialogue = dialogs[dialogueID];
|
||||||
|
|
||||||
const result: DialogueInfo = {
|
const result: IDialogueInfo = {
|
||||||
_id: dialogueID,
|
_id: dialogueID,
|
||||||
type: dialogue.type ? dialogue.type : MessageType.NPC_TRADER,
|
type: dialogue.type ? dialogue.type : MessageType.NPC_TRADER,
|
||||||
message: this.dialogueHelper.getMessagePreview(dialogue),
|
message: this.dialogueHelper.getMessagePreview(dialogue),
|
||||||
@ -118,7 +118,7 @@ export class DialogueController {
|
|||||||
* @returns IUserDialogInfo array
|
* @returns IUserDialogInfo array
|
||||||
*/
|
*/
|
||||||
public getDialogueUsers(
|
public getDialogueUsers(
|
||||||
dialog: Dialogue,
|
dialog: IDialogue,
|
||||||
messageType: MessageType,
|
messageType: MessageType,
|
||||||
sessionID: string,
|
sessionID: string,
|
||||||
): IUserDialogInfo[] | undefined {
|
): IUserDialogInfo[] | undefined {
|
||||||
@ -185,7 +185,7 @@ export class DialogueController {
|
|||||||
* @param request get dialog request (params used when dialog doesnt exist in profile)
|
* @param request get dialog request (params used when dialog doesnt exist in profile)
|
||||||
* @returns Dialogue
|
* @returns Dialogue
|
||||||
*/
|
*/
|
||||||
protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue {
|
protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue {
|
||||||
if (!profile.dialogues[request.dialogId]) {
|
if (!profile.dialogues[request.dialogId]) {
|
||||||
profile.dialogues[request.dialogId] = {
|
profile.dialogues[request.dialogId] = {
|
||||||
_id: request.dialogId,
|
_id: request.dialogId,
|
||||||
@ -265,7 +265,7 @@ export class DialogueController {
|
|||||||
* @param messages Messages to check
|
* @param messages Messages to check
|
||||||
* @returns true if uncollected rewards found
|
* @returns true if uncollected rewards found
|
||||||
*/
|
*/
|
||||||
protected messagesHaveUncollectedRewards(messages: Message[]): boolean {
|
protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean {
|
||||||
return messages.some((message) => (message.items?.data?.length ?? 0) > 0);
|
return messages.some((message) => (message.items?.data?.length ?? 0) > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -384,7 +384,7 @@ export class DialogueController {
|
|||||||
* @param dialogueId Dialog to get mail attachments from
|
* @param dialogueId Dialog to get mail attachments from
|
||||||
* @returns Message array
|
* @returns Message array
|
||||||
*/
|
*/
|
||||||
protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[] {
|
protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[] {
|
||||||
const timeNow = this.timeUtil.getTimestamp();
|
const timeNow = this.timeUtil.getTimestamp();
|
||||||
const dialogs = this.dialogueHelper.getDialogsForProfile(sessionId);
|
const dialogs = this.dialogueHelper.getDialogsForProfile(sessionId);
|
||||||
return dialogs[dialogueId].messages.filter((message) => timeNow < message.dt + (message.maxStorageTime ?? 0));
|
return dialogs[dialogueId].messages.filter((message) => timeNow < message.dt + (message.maxStorageTime ?? 0));
|
||||||
@ -395,7 +395,7 @@ export class DialogueController {
|
|||||||
* @param messages Messages to parse
|
* @param messages Messages to parse
|
||||||
* @returns messages with items to collect
|
* @returns messages with items to collect
|
||||||
*/
|
*/
|
||||||
protected getMessagesWithAttachments(messages: Message[]): Message[] {
|
protected getMessagesWithAttachments(messages: IMessage[]): IMessage[] {
|
||||||
return messages.filter((message) => (message.items?.data?.length ?? 0) > 0);
|
return messages.filter((message) => (message.items?.data?.length ?? 0) > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -433,7 +433,7 @@ export class DialogueController {
|
|||||||
* @param message Message to check expiry of
|
* @param message Message to check expiry of
|
||||||
* @returns true or false
|
* @returns true or false
|
||||||
*/
|
*/
|
||||||
protected messageHasExpired(message: Message): boolean {
|
protected messageHasExpired(message: IMessage): boolean {
|
||||||
return this.timeUtil.getTimestamp() > message.dt + (message.maxStorageTime ?? 0);
|
return this.timeUtil.getTimestamp() > message.dt + (message.maxStorageTime ?? 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
|||||||
import { IBotHideoutArea, IProduct, IScavCase, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase";
|
import { IBotHideoutArea, IProduct, IScavCase, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase";
|
||||||
import { IItem } from "@spt/models/eft/common/tables/IItem";
|
import { IItem } from "@spt/models/eft/common/tables/IItem";
|
||||||
import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData";
|
import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData";
|
||||||
import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea";
|
import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea";
|
||||||
import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData";
|
import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData";
|
||||||
import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData";
|
import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData";
|
||||||
import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
||||||
@ -272,7 +272,7 @@ export class HideoutController {
|
|||||||
pmcData: IPmcData,
|
pmcData: IPmcData,
|
||||||
profileParentHideoutArea: IBotHideoutArea,
|
profileParentHideoutArea: IBotHideoutArea,
|
||||||
dbHideoutArea: IHideoutArea,
|
dbHideoutArea: IHideoutArea,
|
||||||
hideoutStage: Stage,
|
hideoutStage: IStage,
|
||||||
): void {
|
): void {
|
||||||
// Add key/value to `hideoutAreaStashes` dictionary - used to link hideout area to inventory stash by its id
|
// Add key/value to `hideoutAreaStashes` dictionary - used to link hideout area to inventory stash by its id
|
||||||
if (!pmcData.Inventory.hideoutAreaStashes[dbHideoutArea.type]) {
|
if (!pmcData.Inventory.hideoutAreaStashes[dbHideoutArea.type]) {
|
||||||
@ -327,7 +327,7 @@ export class HideoutController {
|
|||||||
*/
|
*/
|
||||||
protected addMissingPresetStandItemsToProfile(
|
protected addMissingPresetStandItemsToProfile(
|
||||||
sessionId: string,
|
sessionId: string,
|
||||||
equipmentPresetStage: Stage,
|
equipmentPresetStage: IStage,
|
||||||
pmcData: IPmcData,
|
pmcData: IPmcData,
|
||||||
equipmentPresetHideoutArea: IHideoutArea,
|
equipmentPresetHideoutArea: IHideoutArea,
|
||||||
output: IItemEventRouterResponse,
|
output: IItemEventRouterResponse,
|
||||||
@ -377,7 +377,7 @@ export class HideoutController {
|
|||||||
sessionId: string,
|
sessionId: string,
|
||||||
pmcData: IPmcData,
|
pmcData: IPmcData,
|
||||||
dbHideoutArea: IHideoutArea,
|
dbHideoutArea: IHideoutArea,
|
||||||
hideoutStage: Stage,
|
hideoutStage: IStage,
|
||||||
): void {
|
): void {
|
||||||
const existingInventoryItem = pmcData.Inventory.items.find((item) => item._id === dbHideoutArea._id);
|
const existingInventoryItem = pmcData.Inventory.items.find((item) => item._id === dbHideoutArea._id);
|
||||||
if (existingInventoryItem) {
|
if (existingInventoryItem) {
|
||||||
@ -403,7 +403,7 @@ export class HideoutController {
|
|||||||
sessionID: string,
|
sessionID: string,
|
||||||
areaType: HideoutAreas,
|
areaType: HideoutAreas,
|
||||||
hideoutDbData: IHideoutArea,
|
hideoutDbData: IHideoutArea,
|
||||||
hideoutStage: Stage,
|
hideoutStage: IStage,
|
||||||
output: IItemEventRouterResponse,
|
output: IItemEventRouterResponse,
|
||||||
): void {
|
): void {
|
||||||
if (!output.profileChanges[sessionID].changedHideoutStashes) {
|
if (!output.profileChanges[sessionID].changedHideoutStashes) {
|
||||||
|
@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu
|
|||||||
import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData";
|
import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData";
|
||||||
import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData";
|
import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData";
|
||||||
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { Insurance } from "@spt/models/eft/profile/ISptProfile";
|
import { IInsurance } from "@spt/models/eft/profile/ISptProfile";
|
||||||
import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData";
|
import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
import { Money } from "@spt/models/enums/Money";
|
import { Money } from "@spt/models/enums/Money";
|
||||||
@ -97,7 +97,7 @@ export class InsuranceController {
|
|||||||
* @param time The time to check ready status against. Current time by default.
|
* @param time The time to check ready status against. Current time by default.
|
||||||
* @returns All insured items that are ready to be processed.
|
* @returns All insured items that are ready to be processed.
|
||||||
*/
|
*/
|
||||||
protected filterInsuredItems(sessionID: string, time?: number): Insurance[] {
|
protected filterInsuredItems(sessionID: string, time?: number): IInsurance[] {
|
||||||
// Use the current time by default.
|
// Use the current time by default.
|
||||||
const insuranceTime = time || this.timeUtil.getTimestamp();
|
const insuranceTime = time || this.timeUtil.getTimestamp();
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ export class InsuranceController {
|
|||||||
* @param sessionID The session ID that should receive the processed items.
|
* @param sessionID The session ID that should receive the processed items.
|
||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void {
|
protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void {
|
||||||
this.logger.debug(
|
this.logger.debug(
|
||||||
`Processing ${insuranceDetails.length} insurance packages, which includes a total of ${this.countAllInsuranceItems(
|
`Processing ${insuranceDetails.length} insurance packages, which includes a total of ${this.countAllInsuranceItems(
|
||||||
insuranceDetails,
|
insuranceDetails,
|
||||||
@ -153,7 +153,7 @@ export class InsuranceController {
|
|||||||
* @param insurance
|
* @param insurance
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
protected countAllInsuranceItems(insurance: Insurance[]): number {
|
protected countAllInsuranceItems(insurance: IInsurance[]): number {
|
||||||
return this.mathUtil.arraySum(insurance.map((ins) => ins.items.length));
|
return this.mathUtil.arraySum(insurance.map((ins) => ins.items.length));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,7 +164,7 @@ export class InsuranceController {
|
|||||||
* @param index The array index of the insurance package to remove.
|
* @param index The array index of the insurance package to remove.
|
||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void {
|
protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void {
|
||||||
const profile = this.saveServer.getProfile(sessionID);
|
const profile = this.saveServer.getProfile(sessionID);
|
||||||
profile.insurance = profile.insurance.filter(
|
profile.insurance = profile.insurance.filter(
|
||||||
(insurance) =>
|
(insurance) =>
|
||||||
@ -184,7 +184,7 @@ export class InsuranceController {
|
|||||||
* @param insured - The insurance object containing the items to evaluate for deletion.
|
* @param insured - The insurance object containing the items to evaluate for deletion.
|
||||||
* @returns A Set containing the IDs of items that should be deleted.
|
* @returns A Set containing the IDs of items that should be deleted.
|
||||||
*/
|
*/
|
||||||
protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set<string> {
|
protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set<string> {
|
||||||
const toDelete = new Set<string>();
|
const toDelete = new Set<string>();
|
||||||
|
|
||||||
// Populate a Map object of items for quick lookup by their ID and use it to populate a Map of main-parent items
|
// Populate a Map object of items for quick lookup by their ID and use it to populate a Map of main-parent items
|
||||||
@ -231,7 +231,7 @@ export class InsuranceController {
|
|||||||
*/
|
*/
|
||||||
protected populateParentAttachmentsMap(
|
protected populateParentAttachmentsMap(
|
||||||
rootItemParentID: string,
|
rootItemParentID: string,
|
||||||
insured: Insurance,
|
insured: IInsurance,
|
||||||
itemsMap: Map<string, IItem>,
|
itemsMap: Map<string, IItem>,
|
||||||
): Map<string, IItem[]> {
|
): Map<string, IItem[]> {
|
||||||
const mainParentToAttachmentsMap = new Map<string, IItem[]>();
|
const mainParentToAttachmentsMap = new Map<string, IItem[]>();
|
||||||
@ -348,7 +348,7 @@ export class InsuranceController {
|
|||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
protected processRegularItems(
|
protected processRegularItems(
|
||||||
insured: Insurance,
|
insured: IInsurance,
|
||||||
toDelete: Set<string>,
|
toDelete: Set<string>,
|
||||||
parentAttachmentsMap: Map<string, IItem[]>,
|
parentAttachmentsMap: Map<string, IItem[]>,
|
||||||
): void {
|
): void {
|
||||||
@ -518,7 +518,7 @@ export class InsuranceController {
|
|||||||
* @param toDelete The items that should be deleted.
|
* @param toDelete The items that should be deleted.
|
||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
protected removeItemsFromInsurance(insured: Insurance, toDelete: Set<string>): void {
|
protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set<string>): void {
|
||||||
insured.items = insured.items.filter((item) => !toDelete.has(item._id));
|
insured.items = insured.items.filter((item) => !toDelete.has(item._id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -529,7 +529,7 @@ export class InsuranceController {
|
|||||||
* @param insurance The context of insurance to use.
|
* @param insurance The context of insurance to use.
|
||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
protected sendMail(sessionID: string, insurance: Insurance): void {
|
protected sendMail(sessionID: string, insurance: IInsurance): void {
|
||||||
const labsId = "laboratory";
|
const labsId = "laboratory";
|
||||||
// After all of the item filtering that we've done, if there are no items remaining, the insurance has
|
// After all of the item filtering that we've done, if there are no items remaining, the insurance has
|
||||||
// successfully "failed" to return anything and an appropriate message should be sent to the player.
|
// successfully "failed" to return anything and an appropriate message should be sent to the player.
|
||||||
@ -716,9 +716,3 @@ export class InsuranceController {
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Represents an insurance item that has had it's common locale-name and value added to it.
|
|
||||||
interface EnrichedItem extends IItem {
|
|
||||||
name: string;
|
|
||||||
dynamicPrice: number;
|
|
||||||
}
|
|
||||||
|
@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData"
|
|||||||
import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData";
|
import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData";
|
||||||
import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData";
|
import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData";
|
||||||
import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse";
|
import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse";
|
||||||
import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile";
|
import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig";
|
import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig";
|
||||||
import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData";
|
import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData";
|
||||||
@ -189,7 +189,7 @@ export class LauncherController {
|
|||||||
* @param sessionId Player id
|
* @param sessionId Player id
|
||||||
* @returns Array of mod details
|
* @returns Array of mod details
|
||||||
*/
|
*/
|
||||||
public getServerModsProfileUsed(sessionId: string): ModDetails[] {
|
public getServerModsProfileUsed(sessionId: string): IModDetails[] {
|
||||||
const profile = this.profileHelper.getFullProfile(sessionId);
|
const profile = this.profileHelper.getFullProfile(sessionId);
|
||||||
|
|
||||||
if (profile?.spt?.mods) {
|
if (profile?.spt?.mods) {
|
||||||
|
@ -17,7 +17,7 @@ import { IProfileChangeVoiceRequestData } from "@spt/models/eft/profile/IProfile
|
|||||||
import { IProfileCreateRequestData } from "@spt/models/eft/profile/IProfileCreateRequestData";
|
import { IProfileCreateRequestData } from "@spt/models/eft/profile/IProfileCreateRequestData";
|
||||||
import { ISearchFriendRequestData } from "@spt/models/eft/profile/ISearchFriendRequestData";
|
import { ISearchFriendRequestData } from "@spt/models/eft/profile/ISearchFriendRequestData";
|
||||||
import { ISearchFriendResponse } from "@spt/models/eft/profile/ISearchFriendResponse";
|
import { ISearchFriendResponse } from "@spt/models/eft/profile/ISearchFriendResponse";
|
||||||
import { ISptProfile, Inraid, Vitality } from "@spt/models/eft/profile/ISptProfile";
|
import { IInraid, ISptProfile, IVitality } from "@spt/models/eft/profile/ISptProfile";
|
||||||
import { IValidateNicknameRequestData } from "@spt/models/eft/profile/IValidateNicknameRequestData";
|
import { IValidateNicknameRequestData } from "@spt/models/eft/profile/IValidateNicknameRequestData";
|
||||||
import { ItemTpl } from "@spt/models/enums/ItemTpl";
|
import { ItemTpl } from "@spt/models/enums/ItemTpl";
|
||||||
import { MessageType } from "@spt/models/enums/MessageType";
|
import { MessageType } from "@spt/models/enums/MessageType";
|
||||||
@ -177,8 +177,8 @@ export class ProfileController {
|
|||||||
userbuilds: profileTemplate.userbuilds,
|
userbuilds: profileTemplate.userbuilds,
|
||||||
dialogues: profileTemplate.dialogues,
|
dialogues: profileTemplate.dialogues,
|
||||||
spt: this.profileHelper.getDefaultSptDataObject(),
|
spt: this.profileHelper.getDefaultSptDataObject(),
|
||||||
vitality: {} as Vitality,
|
vitality: {} as IVitality,
|
||||||
inraid: {} as Inraid,
|
inraid: {} as IInraid,
|
||||||
insurance: [],
|
insurance: [],
|
||||||
traderPurchases: {},
|
traderPurchases: {},
|
||||||
achievements: {},
|
achievements: {},
|
||||||
|
@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem";
|
|||||||
import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader";
|
import { IBarterScheme, ITraderAssort } from "@spt/models/eft/common/tables/ITrader";
|
||||||
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { ISptProfile } from "@spt/models/eft/profile/ISptProfile";
|
import { ISptProfile } from "@spt/models/eft/profile/ISptProfile";
|
||||||
import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData";
|
import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData";
|
||||||
import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData";
|
import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData";
|
||||||
import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult";
|
import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult";
|
||||||
import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData";
|
import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData";
|
||||||
@ -803,7 +803,7 @@ export class RagfairController {
|
|||||||
* @param requirements
|
* @param requirements
|
||||||
* @returns Rouble price
|
* @returns Rouble price
|
||||||
*/
|
*/
|
||||||
protected calculateRequirementsPriceInRub(requirements: Requirement[]): number {
|
protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number {
|
||||||
let requirementsPriceInRub = 0;
|
let requirementsPriceInRub = 0;
|
||||||
for (const item of requirements) {
|
for (const item of requirements) {
|
||||||
const requestedItemTpl = item._tpl;
|
const requestedItemTpl = item._tpl;
|
||||||
@ -860,7 +860,7 @@ export class RagfairController {
|
|||||||
|
|
||||||
public createPlayerOffer(
|
public createPlayerOffer(
|
||||||
sessionId: string,
|
sessionId: string,
|
||||||
requirements: Requirement[],
|
requirements: IRequirement[],
|
||||||
items: IItem[],
|
items: IItem[],
|
||||||
sellInOnePiece: boolean,
|
sellInOnePiece: boolean,
|
||||||
): IRagfairOffer {
|
): IRagfairOffer {
|
||||||
|
@ -22,7 +22,7 @@ import {
|
|||||||
import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties";
|
import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties";
|
||||||
import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest";
|
import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest";
|
||||||
import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest";
|
import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest";
|
||||||
import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig";
|
||||||
import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray";
|
import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray";
|
||||||
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";
|
||||||
@ -80,7 +80,7 @@ export class BotEquipmentModGenerator {
|
|||||||
parentId: string,
|
parentId: string,
|
||||||
parentTemplate: ITemplateItem,
|
parentTemplate: ITemplateItem,
|
||||||
settings: IGenerateEquipmentProperties,
|
settings: IGenerateEquipmentProperties,
|
||||||
specificBlacklist: EquipmentFilterDetails,
|
specificBlacklist: IEquipmentFilterDetails,
|
||||||
shouldForceSpawn = false,
|
shouldForceSpawn = false,
|
||||||
): IItem[] {
|
): IItem[] {
|
||||||
let forceSpawn = shouldForceSpawn;
|
let forceSpawn = shouldForceSpawn;
|
||||||
@ -1272,7 +1272,7 @@ export class BotEquipmentModGenerator {
|
|||||||
desiredSlotName: string,
|
desiredSlotName: string,
|
||||||
modTemplate: ITemplateItem,
|
modTemplate: ITemplateItem,
|
||||||
modPool: IMods,
|
modPool: IMods,
|
||||||
botEquipBlacklist: EquipmentFilterDetails,
|
botEquipBlacklist: IEquipmentFilterDetails,
|
||||||
): void {
|
): void {
|
||||||
const desiredSlotObject = modTemplate._props.Slots?.find((slot) => slot._name.includes(desiredSlotName));
|
const desiredSlotObject = modTemplate._props.Slots?.find((slot) => slot._name.includes(desiredSlotName));
|
||||||
if (desiredSlotObject) {
|
if (desiredSlotObject) {
|
||||||
@ -1309,7 +1309,7 @@ export class BotEquipmentModGenerator {
|
|||||||
protected getDynamicModPool(
|
protected getDynamicModPool(
|
||||||
parentItemId: string,
|
parentItemId: string,
|
||||||
modSlot: string,
|
modSlot: string,
|
||||||
botEquipBlacklist: EquipmentFilterDetails,
|
botEquipBlacklist: IEquipmentFilterDetails,
|
||||||
): string[] {
|
): string[] {
|
||||||
const modsFromDynamicPool = this.cloner.clone(
|
const modsFromDynamicPool = this.cloner.clone(
|
||||||
this.botEquipmentModPoolService.getCompatibleModsForWeaponSlot(parentItemId, modSlot),
|
this.botEquipmentModPoolService.getCompatibleModsForWeaponSlot(parentItemId, modSlot),
|
||||||
@ -1335,7 +1335,7 @@ export class BotEquipmentModGenerator {
|
|||||||
*/
|
*/
|
||||||
protected filterModsByBlacklist(
|
protected filterModsByBlacklist(
|
||||||
allowedMods: string[],
|
allowedMods: string[],
|
||||||
botEquipBlacklist: EquipmentFilterDetails,
|
botEquipBlacklist: IEquipmentFilterDetails,
|
||||||
modSlot: string,
|
modSlot: string,
|
||||||
): string[] {
|
): string[] {
|
||||||
// No blacklist, nothing to filter out
|
// No blacklist, nothing to filter out
|
||||||
|
@ -20,7 +20,7 @@ import { GameEditions } from "@spt/models/enums/GameEditions";
|
|||||||
import { ItemTpl } from "@spt/models/enums/ItemTpl";
|
import { ItemTpl } from "@spt/models/enums/ItemTpl";
|
||||||
import { MemberCategory } from "@spt/models/enums/MemberCategory";
|
import { MemberCategory } from "@spt/models/enums/MemberCategory";
|
||||||
import { SideType } from "@spt/models/enums/SideType";
|
import { SideType } from "@spt/models/enums/SideType";
|
||||||
import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
||||||
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
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";
|
||||||
@ -76,7 +76,7 @@ export class BotGenerator {
|
|||||||
bot.Info.Settings.Role = role;
|
bot.Info.Settings.Role = role;
|
||||||
bot.Info.Side = SideType.SAVAGE;
|
bot.Info.Side = SideType.SAVAGE;
|
||||||
|
|
||||||
const botGenDetails: BotGenerationDetails = {
|
const botGenDetails: IBotGenerationDetails = {
|
||||||
isPmc: false,
|
isPmc: false,
|
||||||
side: SideType.SAVAGE,
|
side: SideType.SAVAGE,
|
||||||
role: role,
|
role: role,
|
||||||
@ -98,7 +98,7 @@ export class BotGenerator {
|
|||||||
* @param botGenerationDetails details on how to generate bots
|
* @param botGenerationDetails details on how to generate bots
|
||||||
* @returns constructed bot
|
* @returns constructed bot
|
||||||
*/
|
*/
|
||||||
public prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase {
|
public prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase {
|
||||||
const preparedBotBase = this.getPreparedBotBase(
|
const preparedBotBase = this.getPreparedBotBase(
|
||||||
botGenerationDetails.eventRole ?? botGenerationDetails.role, // Use eventRole if provided,
|
botGenerationDetails.eventRole ?? botGenerationDetails.role, // Use eventRole if provided,
|
||||||
botGenerationDetails.side,
|
botGenerationDetails.side,
|
||||||
@ -150,7 +150,7 @@ export class BotGenerator {
|
|||||||
sessionId: string,
|
sessionId: string,
|
||||||
bot: IBotBase,
|
bot: IBotBase,
|
||||||
botJsonTemplate: IBotType,
|
botJsonTemplate: IBotType,
|
||||||
botGenerationDetails: BotGenerationDetails,
|
botGenerationDetails: IBotGenerationDetails,
|
||||||
): IBotBase {
|
): IBotBase {
|
||||||
const botRoleLowercase = botGenerationDetails.role.toLowerCase();
|
const botRoleLowercase = botGenerationDetails.role.toLowerCase();
|
||||||
const botLevel = this.botLevelGenerator.generateBotLevel(
|
const botLevel = this.botLevelGenerator.generateBotLevel(
|
||||||
@ -285,7 +285,7 @@ export class BotGenerator {
|
|||||||
protected setBotAppearance(
|
protected setBotAppearance(
|
||||||
bot: IBotBase,
|
bot: IBotBase,
|
||||||
appearance: IAppearance,
|
appearance: IAppearance,
|
||||||
botGenerationDetails: BotGenerationDetails,
|
botGenerationDetails: IBotGenerationDetails,
|
||||||
): void {
|
): void {
|
||||||
bot.Customization.Head = this.weightedRandomHelper.getWeightedValue<string>(appearance.head);
|
bot.Customization.Head = this.weightedRandomHelper.getWeightedValue<string>(appearance.head);
|
||||||
bot.Customization.Body = this.weightedRandomHelper.getWeightedValue<string>(appearance.body);
|
bot.Customization.Body = this.weightedRandomHelper.getWeightedValue<string>(appearance.body);
|
||||||
|
@ -18,7 +18,7 @@ import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots";
|
|||||||
import { GameEditions } from "@spt/models/enums/GameEditions";
|
import { GameEditions } from "@spt/models/enums/GameEditions";
|
||||||
import { ItemTpl } from "@spt/models/enums/ItemTpl";
|
import { ItemTpl } from "@spt/models/enums/ItemTpl";
|
||||||
import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties";
|
import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties";
|
||||||
import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
import { IBotConfig, IEquipmentFilterDetails } 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 { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService";
|
import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService";
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { MinMax } from "@spt/models/common/MinMax";
|
import { MinMax } from "@spt/models/common/MinMax";
|
||||||
import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult";
|
import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult";
|
||||||
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 { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
import { MathUtil } from "@spt/utils/MathUtil";
|
import { MathUtil } from "@spt/utils/MathUtil";
|
||||||
@ -26,7 +26,7 @@ export class BotLevelGenerator {
|
|||||||
*/
|
*/
|
||||||
public generateBotLevel(
|
public generateBotLevel(
|
||||||
levelDetails: MinMax,
|
levelDetails: MinMax,
|
||||||
botGenerationDetails: BotGenerationDetails,
|
botGenerationDetails: IBotGenerationDetails,
|
||||||
bot: IBotBase,
|
bot: IBotBase,
|
||||||
): IRandomisedBotLevelResult {
|
): IRandomisedBotLevelResult {
|
||||||
const expTable = this.databaseService.getGlobals().config.exp.level.exp_table;
|
const expTable = this.databaseService.getGlobals().config.exp.level.exp_table;
|
||||||
@ -59,7 +59,7 @@ export class BotLevelGenerator {
|
|||||||
* @returns A MinMax of the lowest and highest level to generate the bots
|
* @returns A MinMax of the lowest and highest level to generate the bots
|
||||||
*/
|
*/
|
||||||
protected getRelativeBotLevelRange(
|
protected getRelativeBotLevelRange(
|
||||||
botGenerationDetails: BotGenerationDetails,
|
botGenerationDetails: IBotGenerationDetails,
|
||||||
levelDetails: MinMax,
|
levelDetails: MinMax,
|
||||||
maxAvailableLevel: number,
|
maxAvailableLevel: number,
|
||||||
): MinMax {
|
): MinMax {
|
||||||
|
@ -7,7 +7,7 @@ import { IPreset } from "@spt/models/eft/common/IGlobals";
|
|||||||
import { IItem } from "@spt/models/eft/common/tables/IItem";
|
import { IItem } from "@spt/models/eft/common/tables/IItem";
|
||||||
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
||||||
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
||||||
import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig";
|
import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig";
|
||||||
import { ILootRequest } from "@spt/models/spt/services/ILootRequest";
|
import { ILootRequest } from "@spt/models/spt/services/ILootRequest";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
@ -583,7 +583,7 @@ export class LootGenerator {
|
|||||||
* @param rewardContainerDetails
|
* @param rewardContainerDetails
|
||||||
* @returns Array of item with children arrays
|
* @returns Array of item with children arrays
|
||||||
*/
|
*/
|
||||||
public getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][] {
|
public getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][] {
|
||||||
const itemsToReturn: IItem[][] = [];
|
const itemsToReturn: IItem[][] = [];
|
||||||
|
|
||||||
// Get random items and add to newItemRequest
|
// Get random items and add to newItemRequest
|
||||||
@ -615,7 +615,7 @@ export class LootGenerator {
|
|||||||
* @param rewardContainerDetails
|
* @param rewardContainerDetails
|
||||||
* @returns Single tpl
|
* @returns Single tpl
|
||||||
*/
|
*/
|
||||||
protected pickRewardItem(rewardContainerDetails: RewardDetails): string {
|
protected pickRewardItem(rewardContainerDetails: IRewardDetails): string {
|
||||||
if (rewardContainerDetails.rewardTplPool) {
|
if (rewardContainerDetails.rewardTplPool) {
|
||||||
return this.weightedRandomHelper.getWeightedValue<string>(rewardContainerDetails.rewardTplPool);
|
return this.weightedRandomHelper.getWeightedValue<string>(rewardContainerDetails.rewardTplPool);
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
|||||||
import { ItemAddedResult } from "@spt/models/enums/ItemAddedResult";
|
import { ItemAddedResult } from "@spt/models/enums/ItemAddedResult";
|
||||||
import { MemberCategory } from "@spt/models/enums/MemberCategory";
|
import { MemberCategory } from "@spt/models/enums/MemberCategory";
|
||||||
import { Traders } from "@spt/models/enums/Traders";
|
import { Traders } from "@spt/models/enums/Traders";
|
||||||
import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig";
|
import { IKarmaLevel, IPlayerScavConfig } 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 { SaveServer } from "@spt/servers/SaveServer";
|
import { SaveServer } from "@spt/servers/SaveServer";
|
||||||
@ -229,7 +229,7 @@ export class PlayerScavGenerator {
|
|||||||
* @param karmaSettings Values to modify the bot template with
|
* @param karmaSettings Values to modify the bot template with
|
||||||
* @param baseBotNode bot template to modify according to karama level settings
|
* @param baseBotNode bot template to modify according to karama level settings
|
||||||
*/
|
*/
|
||||||
protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void {
|
protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void {
|
||||||
// Adjust equipment chance values
|
// Adjust equipment chance values
|
||||||
for (const equipmentKey in karmaSettings.modifiers.equipment) {
|
for (const equipmentKey in karmaSettings.modifiers.equipment) {
|
||||||
if (karmaSettings.modifiers.equipment[equipmentKey] === 0) {
|
if (karmaSettings.modifiers.equipment[equipmentKey] === 0) {
|
||||||
|
@ -9,7 +9,7 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper";
|
|||||||
import { IItem } from "@spt/models/eft/common/tables/IItem";
|
import { IItem } from "@spt/models/eft/common/tables/IItem";
|
||||||
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
||||||
import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader";
|
import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader";
|
||||||
import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer";
|
import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer";
|
||||||
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
import { MemberCategory } from "@spt/models/enums/MemberCategory";
|
import { MemberCategory } from "@spt/models/enums/MemberCategory";
|
||||||
@ -17,9 +17,9 @@ import { Money } from "@spt/models/enums/Money";
|
|||||||
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
||||||
import {
|
import {
|
||||||
Condition,
|
Condition,
|
||||||
Dynamic,
|
|
||||||
IArmorPlateBlacklistSettings,
|
IArmorPlateBlacklistSettings,
|
||||||
IBarterDetails,
|
IBarterDetails,
|
||||||
|
IDynamic,
|
||||||
IRagfairConfig,
|
IRagfairConfig,
|
||||||
} from "@spt/models/spt/config/IRagfairConfig";
|
} from "@spt/models/spt/config/IRagfairConfig";
|
||||||
import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice";
|
import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice";
|
||||||
@ -117,7 +117,7 @@ export class RagfairOfferGenerator {
|
|||||||
const isTrader = this.ragfairServerHelper.isTrader(userID);
|
const isTrader = this.ragfairServerHelper.isTrader(userID);
|
||||||
|
|
||||||
const offerRequirements = barterScheme.map((barter) => {
|
const offerRequirements = barterScheme.map((barter) => {
|
||||||
const offerRequirement: OfferRequirement = {
|
const offerRequirement: IOfferRequirement = {
|
||||||
_tpl: barter._tpl,
|
_tpl: barter._tpl,
|
||||||
count: +barter.count.toFixed(2),
|
count: +barter.count.toFixed(2),
|
||||||
onlyFunctional: barter.onlyFunctional ?? false,
|
onlyFunctional: barter.onlyFunctional ?? false,
|
||||||
@ -217,7 +217,7 @@ export class RagfairOfferGenerator {
|
|||||||
* @param offerRequirements barter requirements for offer
|
* @param offerRequirements barter requirements for offer
|
||||||
* @returns rouble cost of offer
|
* @returns rouble cost of offer
|
||||||
*/
|
*/
|
||||||
protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number {
|
protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number {
|
||||||
let roublePrice = 0;
|
let roublePrice = 0;
|
||||||
for (const requirement of offerRequirements) {
|
for (const requirement of offerRequirements) {
|
||||||
roublePrice += this.paymentHelper.isMoneyTpl(requirement._tpl)
|
roublePrice += this.paymentHelper.isMoneyTpl(requirement._tpl)
|
||||||
@ -366,7 +366,7 @@ export class RagfairOfferGenerator {
|
|||||||
protected async createOffersFromAssort(
|
protected async createOffersFromAssort(
|
||||||
assortItemWithChildren: IItem[],
|
assortItemWithChildren: IItem[],
|
||||||
isExpiredOffer: boolean,
|
isExpiredOffer: boolean,
|
||||||
config: Dynamic,
|
config: IDynamic,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const itemDetails = this.itemHelper.getItem(assortItemWithChildren[0]._tpl);
|
const itemDetails = this.itemHelper.getItem(assortItemWithChildren[0]._tpl);
|
||||||
const isPreset = this.presetHelper.isPreset(assortItemWithChildren[0].upd.sptPresetId);
|
const isPreset = this.presetHelper.isPreset(assortItemWithChildren[0].upd.sptPresetId);
|
||||||
|
@ -8,8 +8,8 @@ import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
|||||||
import { Money } from "@spt/models/enums/Money";
|
import { Money } from "@spt/models/enums/Money";
|
||||||
import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig";
|
import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig";
|
||||||
import {
|
import {
|
||||||
RewardCountAndPriceDetails,
|
IRewardCountAndPriceDetails,
|
||||||
ScavCaseRewardCountsAndPrices,
|
IScavCaseRewardCountsAndPrices,
|
||||||
} from "@spt/models/spt/hideout/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";
|
||||||
@ -194,7 +194,7 @@ export class ScavCaseRewardGenerator {
|
|||||||
*/
|
*/
|
||||||
protected pickRandomRewards(
|
protected pickRandomRewards(
|
||||||
items: ITemplateItem[],
|
items: ITemplateItem[],
|
||||||
itemFilters: RewardCountAndPriceDetails,
|
itemFilters: IRewardCountAndPriceDetails,
|
||||||
rarity: string,
|
rarity: string,
|
||||||
): ITemplateItem[] {
|
): ITemplateItem[] {
|
||||||
const result: ITemplateItem[] = [];
|
const result: ITemplateItem[] = [];
|
||||||
@ -335,7 +335,7 @@ export class ScavCaseRewardGenerator {
|
|||||||
*/
|
*/
|
||||||
protected getFilteredItemsByPrice(
|
protected getFilteredItemsByPrice(
|
||||||
dbItems: ITemplateItem[],
|
dbItems: ITemplateItem[],
|
||||||
itemFilters: RewardCountAndPriceDetails,
|
itemFilters: IRewardCountAndPriceDetails,
|
||||||
): ITemplateItem[] {
|
): ITemplateItem[] {
|
||||||
return dbItems.filter((item) => {
|
return dbItems.filter((item) => {
|
||||||
const handbookPrice = this.ragfairPriceService.getStaticPriceForItem(item._id);
|
const handbookPrice = this.ragfairPriceService.getStaticPriceForItem(item._id);
|
||||||
@ -350,9 +350,9 @@ export class ScavCaseRewardGenerator {
|
|||||||
* @param scavCaseDetails scavcase.json values
|
* @param scavCaseDetails scavcase.json values
|
||||||
* @returns ScavCaseRewardCountsAndPrices object
|
* @returns ScavCaseRewardCountsAndPrices object
|
||||||
*/
|
*/
|
||||||
protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices {
|
protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices {
|
||||||
const rewardTypes = Object.keys(scavCaseDetails.EndProducts) as Array<keyof ScavCaseRewardCountsAndPrices>; // Default is ["Common", "Rare", "Superrare"];
|
const rewardTypes = Object.keys(scavCaseDetails.EndProducts) as Array<keyof IScavCaseRewardCountsAndPrices>; // Default is ["Common", "Rare", "Superrare"];
|
||||||
const result: Partial<ScavCaseRewardCountsAndPrices> = {}; // Make partial object as we're going to add all the data immediately after
|
const result: Partial<IScavCaseRewardCountsAndPrices> = {}; // Make partial object as we're going to add all the data immediately after
|
||||||
|
|
||||||
// Create reward min/max counts for each type
|
// Create reward min/max counts for each type
|
||||||
for (const rewardType of rewardTypes) {
|
for (const rewardType of rewardTypes) {
|
||||||
@ -364,7 +364,7 @@ export class ScavCaseRewardGenerator {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return result as ScavCaseRewardCountsAndPrices;
|
return result as IScavCaseRewardCountsAndPrices;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { MinMax } from "@spt/models/common/MinMax";
|
import { MinMax } from "@spt/models/common/MinMax";
|
||||||
import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType";
|
import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig";
|
import { EquipmentFilters, IBotConfig, IRandomisationDetails } 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";
|
||||||
@ -126,7 +126,7 @@ export class BotHelper {
|
|||||||
public getBotRandomizationDetails(
|
public getBotRandomizationDetails(
|
||||||
botLevel: number,
|
botLevel: number,
|
||||||
botEquipConfig: EquipmentFilters,
|
botEquipConfig: EquipmentFilters,
|
||||||
): RandomisationDetails | undefined {
|
): IRandomisationDetails | undefined {
|
||||||
// No randomisation details found, skip
|
// No randomisation details found, skip
|
||||||
if (!botEquipConfig || Object.keys(botEquipConfig).length === 0 || !botEquipConfig.randomisation) {
|
if (!botEquipConfig || Object.keys(botEquipConfig).length === 0 || !botEquipConfig.randomisation) {
|
||||||
return undefined;
|
return undefined;
|
||||||
|
@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper";
|
|||||||
import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper";
|
import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper";
|
||||||
import { NotifierHelper } from "@spt/helpers/NotifierHelper";
|
import { NotifierHelper } from "@spt/helpers/NotifierHelper";
|
||||||
import { IItem } from "@spt/models/eft/common/tables/IItem";
|
import { IItem } from "@spt/models/eft/common/tables/IItem";
|
||||||
import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile";
|
import { IDialogue, IMessagePreview } 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 { DatabaseServer } from "@spt/servers/DatabaseServer";
|
||||||
import { SaveServer } from "@spt/servers/SaveServer";
|
import { SaveServer } from "@spt/servers/SaveServer";
|
||||||
@ -28,10 +28,10 @@ export class DialogueHelper {
|
|||||||
* @param dialogue
|
* @param dialogue
|
||||||
* @returns MessagePreview
|
* @returns MessagePreview
|
||||||
*/
|
*/
|
||||||
public getMessagePreview(dialogue: Dialogue): MessagePreview {
|
public getMessagePreview(dialogue: IDialogue): IMessagePreview {
|
||||||
// The last message of the dialogue should be shown on the preview.
|
// The last message of the dialogue should be shown on the preview.
|
||||||
const message = dialogue.messages[dialogue.messages.length - 1];
|
const message = dialogue.messages[dialogue.messages.length - 1];
|
||||||
const result: MessagePreview = {
|
const result: IMessagePreview = {
|
||||||
dt: message?.dt,
|
dt: message?.dt,
|
||||||
type: message?.type,
|
type: message?.type,
|
||||||
templateId: message?.templateId,
|
templateId: message?.templateId,
|
||||||
@ -94,7 +94,7 @@ export class DialogueHelper {
|
|||||||
* @param sessionId Session/player id
|
* @param sessionId Session/player id
|
||||||
* @returns Dialog dictionary
|
* @returns Dialog dictionary
|
||||||
*/
|
*/
|
||||||
public getDialogsForProfile(sessionId: string): Record<string, Dialogue> {
|
public getDialogsForProfile(sessionId: string): Record<string, IDialogue> {
|
||||||
const profile = this.saveServer.getProfile(sessionId);
|
const profile = this.saveServer.getProfile(sessionId);
|
||||||
if (!profile.dialogues) {
|
if (!profile.dialogues) {
|
||||||
profile.dialogues = {};
|
profile.dialogues = {};
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
||||||
import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase";
|
import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase";
|
||||||
import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData";
|
import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData";
|
||||||
import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile";
|
import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig";
|
import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
@ -275,7 +275,7 @@ export class HealthHelper {
|
|||||||
protected saveEffects(
|
protected saveEffects(
|
||||||
pmcData: IPmcData,
|
pmcData: IPmcData,
|
||||||
sessionId: string,
|
sessionId: string,
|
||||||
bodyPartsWithEffects: Effects,
|
bodyPartsWithEffects: IEffects,
|
||||||
deleteExistingEffects = true,
|
deleteExistingEffects = true,
|
||||||
): void {
|
): void {
|
||||||
if (!this.healthConfig.save.effects) {
|
if (!this.healthConfig.save.effects) {
|
||||||
|
@ -4,7 +4,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
|||||||
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
||||||
import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase";
|
import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase";
|
||||||
import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem";
|
import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem";
|
||||||
import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea";
|
import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
|
||||||
import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
||||||
import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction";
|
import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction";
|
||||||
import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
||||||
@ -155,7 +155,7 @@ export class HideoutHelper {
|
|||||||
* @param pmcData Profile to add bonus to
|
* @param pmcData Profile to add bonus to
|
||||||
* @param bonus Bonus to add to profile
|
* @param bonus Bonus to add to profile
|
||||||
*/
|
*/
|
||||||
public applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void {
|
public applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void {
|
||||||
// Handle additional changes some bonuses need before being added
|
// Handle additional changes some bonuses need before being added
|
||||||
switch (bonus.type) {
|
switch (bonus.type) {
|
||||||
case BonusType.STASH_SIZE: {
|
case BonusType.STASH_SIZE: {
|
||||||
|
@ -20,7 +20,7 @@ import { BackendErrorCodes } from "@spt/models/enums/BackendErrorCodes";
|
|||||||
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
||||||
import { BonusType } from "@spt/models/enums/BonusType";
|
import { BonusType } from "@spt/models/enums/BonusType";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig";
|
import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig";
|
||||||
import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems";
|
import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems";
|
||||||
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";
|
||||||
@ -1105,7 +1105,7 @@ export class InventoryHelper {
|
|||||||
* @param itemTpl Container being opened
|
* @param itemTpl Container being opened
|
||||||
* @returns Reward details
|
* @returns Reward details
|
||||||
*/
|
*/
|
||||||
public getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails {
|
public getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails {
|
||||||
return this.inventoryConfig.randomLootContainers[itemTpl];
|
return this.inventoryConfig.randomLootContainers[itemTpl];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Dialogue, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile";
|
import { IDialogue, IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||||
import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived";
|
import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived";
|
||||||
import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent";
|
import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent";
|
||||||
import { MemberCategory } from "@spt/models/enums/MemberCategory";
|
import { MemberCategory } from "@spt/models/enums/MemberCategory";
|
||||||
@ -48,7 +48,7 @@ export class NotificationSendHelper {
|
|||||||
const dialog = this.getDialog(sessionId, messageType, senderDetails);
|
const dialog = this.getDialog(sessionId, messageType, senderDetails);
|
||||||
|
|
||||||
dialog.new += 1;
|
dialog.new += 1;
|
||||||
const message: Message = {
|
const message: IMessage = {
|
||||||
_id: this.hashUtil.generate(),
|
_id: this.hashUtil.generate(),
|
||||||
uid: dialog._id,
|
uid: dialog._id,
|
||||||
type: messageType,
|
type: messageType,
|
||||||
@ -76,7 +76,7 @@ export class NotificationSendHelper {
|
|||||||
* @param senderDetails Who is sending the message
|
* @param senderDetails Who is sending the message
|
||||||
* @returns Dialogue
|
* @returns Dialogue
|
||||||
*/
|
*/
|
||||||
protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue {
|
protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue {
|
||||||
// Use trader id if sender is trader, otherwise use nickname
|
// Use trader id if sender is trader, otherwise use nickname
|
||||||
const key =
|
const key =
|
||||||
senderDetails.Info.MemberCategory === MemberCategory.TRADER
|
senderDetails.Info.MemberCategory === MemberCategory.TRADER
|
||||||
@ -84,7 +84,7 @@ export class NotificationSendHelper {
|
|||||||
: senderDetails.Info.Nickname;
|
: senderDetails.Info.Nickname;
|
||||||
const dialogueData = this.saveServer.getProfile(sessionId).dialogues;
|
const dialogueData = this.saveServer.getProfile(sessionId).dialogues;
|
||||||
const isNewDialogue = !(key in dialogueData);
|
const isNewDialogue = !(key in dialogueData);
|
||||||
let dialogue: Dialogue = dialogueData[key];
|
let dialogue: IDialogue = dialogueData[key];
|
||||||
|
|
||||||
// Existing dialog not found, make new one
|
// Existing dialog not found, make new one
|
||||||
if (isNewDialogue) {
|
if (isNewDialogue) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { HttpServerHelper } from "@spt/helpers/HttpServerHelper";
|
import { HttpServerHelper } from "@spt/helpers/HttpServerHelper";
|
||||||
import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile";
|
import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile";
|
||||||
import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived";
|
import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived";
|
||||||
import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent";
|
import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent";
|
||||||
import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold";
|
import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold";
|
||||||
@ -26,8 +26,8 @@ export class NotifierHelper {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
public createRagfairOfferSoldNotification(
|
public createRagfairOfferSoldNotification(
|
||||||
dialogueMessage: Message,
|
dialogueMessage: IMessage,
|
||||||
ragfairData: MessageContentRagfair,
|
ragfairData: IMessageContentRagfair,
|
||||||
): IWsRagfairOfferSold {
|
): IWsRagfairOfferSold {
|
||||||
return {
|
return {
|
||||||
type: NotificationEventType.RAGFAIR_OFFER_SOLD,
|
type: NotificationEventType.RAGFAIR_OFFER_SOLD,
|
||||||
@ -41,7 +41,7 @@ export class NotifierHelper {
|
|||||||
* @param dialogueMessage
|
* @param dialogueMessage
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
public createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived {
|
public createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived {
|
||||||
return {
|
return {
|
||||||
type: NotificationEventType.CHAT_MESSAGE_RECEIVED,
|
type: NotificationEventType.CHAT_MESSAGE_RECEIVED,
|
||||||
eventId: dialogueMessage._id,
|
eventId: dialogueMessage._id,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { IItem } from "@spt/models/eft/common/tables/IItem";
|
import { IItem } from "@spt/models/eft/common/tables/IItem";
|
||||||
import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem";
|
import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
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";
|
||||||
@ -136,7 +136,7 @@ export class RepairHelper {
|
|||||||
* @returns Amount to reduce max durability by
|
* @returns Amount to reduce max durability by
|
||||||
*/
|
*/
|
||||||
protected getRandomisedWeaponRepairDegradationValue(
|
protected getRandomisedWeaponRepairDegradationValue(
|
||||||
itemProps: Props,
|
itemProps: IProps,
|
||||||
isRepairKit: boolean,
|
isRepairKit: boolean,
|
||||||
weaponMax: number,
|
weaponMax: number,
|
||||||
traderQualityMultipler: number,
|
traderQualityMultipler: number,
|
||||||
|
@ -3,7 +3,7 @@ import os from "node:os";
|
|||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import { ModLoadOrder } from "@spt/loaders/ModLoadOrder";
|
import { ModLoadOrder } from "@spt/loaders/ModLoadOrder";
|
||||||
import { ModTypeCheck } from "@spt/loaders/ModTypeCheck";
|
import { ModTypeCheck } from "@spt/loaders/ModTypeCheck";
|
||||||
import { ModDetails } from "@spt/models/eft/profile/ISptProfile";
|
import { IModDetails } from "@spt/models/eft/profile/ISptProfile";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod";
|
import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod";
|
||||||
import { IPreSptLoadModAsync } from "@spt/models/external/IPreSptLoadModAsync";
|
import { IPreSptLoadModAsync } from "@spt/models/external/IPreSptLoadModAsync";
|
||||||
@ -68,9 +68,9 @@ export class PreSptModLoader implements IModLoader {
|
|||||||
return this.imported;
|
return this.imported;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[] {
|
public getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[] {
|
||||||
// Group all mods used by profile by name
|
// Group all mods used by profile by name
|
||||||
const modsGroupedByName: Record<string, ModDetails[]> = {};
|
const modsGroupedByName: Record<string, IModDetails[]> = {};
|
||||||
for (const mod of profileMods) {
|
for (const mod of profileMods) {
|
||||||
if (!modsGroupedByName[mod.name]) {
|
if (!modsGroupedByName[mod.name]) {
|
||||||
modsGroupedByName[mod.name] = [];
|
modsGroupedByName[mod.name] = [];
|
||||||
|
@ -5,11 +5,11 @@ export interface ICustomizationItem {
|
|||||||
_name: string;
|
_name: string;
|
||||||
_parent: string;
|
_parent: string;
|
||||||
_type: string;
|
_type: string;
|
||||||
_props: Props;
|
_props: IProps;
|
||||||
_proto: string;
|
_proto: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Props {
|
export interface IProps {
|
||||||
Name: string;
|
Name: string;
|
||||||
ShortName: string;
|
ShortName: string;
|
||||||
Description: string;
|
Description: string;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
||||||
import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile";
|
import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile";
|
||||||
|
|
||||||
export interface IProfileTemplates {
|
export interface IProfileTemplates {
|
||||||
Standard: IProfileSides;
|
Standard: IProfileSides;
|
||||||
@ -22,7 +22,7 @@ export interface IProfileSides {
|
|||||||
export interface ITemplateSide {
|
export interface ITemplateSide {
|
||||||
character: IPmcData;
|
character: IPmcData;
|
||||||
suits: string[];
|
suits: string[];
|
||||||
dialogues: Record<string, Dialogue>;
|
dialogues: Record<string, IDialogue>;
|
||||||
userbuilds: IUserBuilds;
|
userbuilds: IUserBuilds;
|
||||||
trader: IProfileTraderTemplate;
|
trader: IProfileTraderTemplate;
|
||||||
}
|
}
|
||||||
|
@ -5,12 +5,12 @@ export interface ITemplateItem {
|
|||||||
_name: string;
|
_name: string;
|
||||||
_parent: string;
|
_parent: string;
|
||||||
_type: ItemType;
|
_type: ItemType;
|
||||||
_props: Props;
|
_props: IProps;
|
||||||
_proto?: string;
|
_proto?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Props {
|
export interface IProps {
|
||||||
AllowSpawnOnLocations?: any[];
|
AllowSpawnOnLocations?: string[];
|
||||||
BeltMagazineRefreshCount?: number;
|
BeltMagazineRefreshCount?: number;
|
||||||
ChangePriceCoef?: number;
|
ChangePriceCoef?: number;
|
||||||
FixedPrice?: boolean;
|
FixedPrice?: boolean;
|
||||||
@ -177,7 +177,7 @@ export interface Props {
|
|||||||
spawnRarity?: string;
|
spawnRarity?: string;
|
||||||
minCountSpawn?: number;
|
minCountSpawn?: number;
|
||||||
maxCountSpawn?: number;
|
maxCountSpawn?: number;
|
||||||
openedByKeyID?: any[];
|
openedByKeyID?: string[];
|
||||||
RigLayoutName?: string;
|
RigLayoutName?: string;
|
||||||
MaxDurability?: number;
|
MaxDurability?: number;
|
||||||
armorZone?: string[];
|
armorZone?: string[];
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Message } from "@spt/models/eft/profile/ISptProfile";
|
import { IMessage } from "@spt/models/eft/profile/ISptProfile";
|
||||||
|
|
||||||
export interface IGetAllAttachmentsResponse {
|
export interface IGetAllAttachmentsResponse {
|
||||||
messages: Message[];
|
messages: IMessage[];
|
||||||
profiles: any[];
|
profiles: any[];
|
||||||
hasMessagesWithRewards: boolean;
|
hasMessagesWithRewards: boolean;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile";
|
import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||||
|
|
||||||
export interface IGetMailDialogViewResponseData {
|
export interface IGetMailDialogViewResponseData {
|
||||||
messages: Message[];
|
messages: IMessage[];
|
||||||
profiles: IUserDialogInfo[];
|
profiles: IUserDialogInfo[];
|
||||||
hasMessagesWithRewards: boolean;
|
hasMessagesWithRewards: boolean;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
export interface IVersionValidateRequestData {
|
export interface IVersionValidateRequestData {
|
||||||
version: Version;
|
version: IVersion;
|
||||||
develop: boolean;
|
develop: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Version {
|
export interface IVersion {
|
||||||
major: string;
|
major: string;
|
||||||
minor: string;
|
minor: string;
|
||||||
game: string;
|
game: string;
|
||||||
|
@ -13,7 +13,7 @@ export interface IHideoutArea {
|
|||||||
displayLevel: boolean;
|
displayLevel: boolean;
|
||||||
enableAreaRequirements: boolean;
|
enableAreaRequirements: boolean;
|
||||||
parentArea?: string;
|
parentArea?: string;
|
||||||
stages: Record<string, Stage>;
|
stages: Record<string, IStage>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IAreaRequirement {
|
export interface IAreaRequirement {
|
||||||
@ -22,9 +22,9 @@ export interface IAreaRequirement {
|
|||||||
type: string;
|
type: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Stage {
|
export interface IStage {
|
||||||
autoUpgrade: boolean;
|
autoUpgrade: boolean;
|
||||||
bonuses: StageBonus[];
|
bonuses: IStageBonus[];
|
||||||
constructionTime: number;
|
constructionTime: number;
|
||||||
/** Containers inventory tpl */
|
/** Containers inventory tpl */
|
||||||
container?: string;
|
container?: string;
|
||||||
@ -71,7 +71,7 @@ export interface IStageRequirement extends IRequirementBase {
|
|||||||
skillLevel?: number;
|
skillLevel?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface StageBonus {
|
export interface IStageBonus {
|
||||||
value: number;
|
value: number;
|
||||||
passive: boolean;
|
passive: boolean;
|
||||||
production: boolean;
|
production: boolean;
|
||||||
|
@ -3,11 +3,11 @@ export interface IHideoutImproveAreaRequestData {
|
|||||||
/** Hideout area id from areas.json */
|
/** Hideout area id from areas.json */
|
||||||
id: string;
|
id: string;
|
||||||
areaType: number;
|
areaType: number;
|
||||||
items: HideoutItem[];
|
items: IHideoutItem[];
|
||||||
timestamp: number;
|
timestamp: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface HideoutItem {
|
export interface IHideoutItem {
|
||||||
/** Hideout inventory id that was used by improvement action */
|
/** Hideout inventory id that was used by improvement action */
|
||||||
id: string;
|
id: string;
|
||||||
count: number;
|
count: number;
|
||||||
|
@ -10,7 +10,7 @@ export interface IHideoutProductionData {
|
|||||||
export interface IHideoutProduction {
|
export interface IHideoutProduction {
|
||||||
_id: string;
|
_id: string;
|
||||||
areaType: number;
|
areaType: number;
|
||||||
requirements: Requirement[];
|
requirements: IRequirement[];
|
||||||
productionTime: number;
|
productionTime: number;
|
||||||
/** Tpl of item being crafted */
|
/** Tpl of item being crafted */
|
||||||
endProduct: string;
|
endProduct: string;
|
||||||
@ -22,7 +22,7 @@ export interface IHideoutProduction {
|
|||||||
productionLimitCount: number;
|
productionLimitCount: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Requirement extends IRequirementBase {
|
export interface IRequirement extends IRequirementBase {
|
||||||
templateId?: string;
|
templateId?: string;
|
||||||
count?: number;
|
count?: number;
|
||||||
isEncoded?: boolean;
|
isEncoded?: boolean;
|
||||||
@ -39,7 +39,7 @@ export interface IRequirementBase {
|
|||||||
|
|
||||||
export type IScavRecipe = {
|
export type IScavRecipe = {
|
||||||
_id: string;
|
_id: string;
|
||||||
requirements: Requirement[];
|
requirements: IRequirement[];
|
||||||
productionTime: number;
|
productionTime: number;
|
||||||
endProducts: IEndProducts;
|
endProducts: IEndProducts;
|
||||||
};
|
};
|
||||||
|
@ -3,17 +3,17 @@ import { MinMax } from "@spt/models/common/MinMax";
|
|||||||
export interface IHideoutScavCase {
|
export interface IHideoutScavCase {
|
||||||
_id: string;
|
_id: string;
|
||||||
ProductionTime: number;
|
ProductionTime: number;
|
||||||
Requirements: Requirement[];
|
Requirements: IRequirement[];
|
||||||
EndProducts: EndProducts;
|
EndProducts: IEndProducts;
|
||||||
}
|
}
|
||||||
export interface Requirement {
|
export interface IRequirement {
|
||||||
templateId: string;
|
templateId: string;
|
||||||
count: number;
|
count: number;
|
||||||
isFunctional: boolean;
|
isFunctional: boolean;
|
||||||
type: string;
|
type: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface EndProducts {
|
export interface IEndProducts {
|
||||||
Common: MinMax;
|
Common: MinMax;
|
||||||
Rare: MinMax;
|
Rare: MinMax;
|
||||||
Superrare: MinMax;
|
Superrare: MinMax;
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
export interface IHideoutScavCaseStartRequestData {
|
export interface IHideoutScavCaseStartRequestData {
|
||||||
Action: "HideoutScavCaseProductionStart";
|
Action: "HideoutScavCaseProductionStart";
|
||||||
recipeId: string;
|
recipeId: string;
|
||||||
items: HideoutItem[];
|
items: IHideoutItem[];
|
||||||
tools: Tool[];
|
tools: ITool[];
|
||||||
timestamp: number;
|
timestamp: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface HideoutItem {
|
export interface IHideoutItem {
|
||||||
id: string;
|
id: string;
|
||||||
count: number;
|
count: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Tool {
|
export interface ITool {
|
||||||
id: string;
|
id: string;
|
||||||
count: number;
|
count: number;
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
export interface IHideoutUpgradeRequestData {
|
export interface IHideoutUpgradeRequestData {
|
||||||
Action: "HideoutUpgrade";
|
Action: "HideoutUpgrade";
|
||||||
areaType: number;
|
areaType: number;
|
||||||
items: HideoutItem[];
|
items: IHideoutItem[];
|
||||||
timestamp: number;
|
timestamp: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface HideoutItem {
|
export interface IHideoutItem {
|
||||||
count: number;
|
count: number;
|
||||||
id: string;
|
id: string;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData";
|
import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData";
|
||||||
|
|
||||||
export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData {
|
export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData {
|
||||||
Action: "Add";
|
Action: "Add";
|
||||||
item: string;
|
item: string;
|
||||||
container: Container;
|
container: IContainer;
|
||||||
}
|
}
|
||||||
|
@ -3,20 +3,20 @@ import { IItemLocation } from "@spt/models/eft/common/tables/IItem";
|
|||||||
|
|
||||||
export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData {}
|
export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData {}
|
||||||
|
|
||||||
export interface To {
|
export interface ITo {
|
||||||
id: string;
|
id: string;
|
||||||
container: string;
|
container: string;
|
||||||
location?: IItemLocation | number; // Hack
|
location?: IItemLocation | number; // Hack
|
||||||
isSearched?: boolean;
|
isSearched?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Container {
|
export interface IContainer {
|
||||||
id: string;
|
id: string;
|
||||||
container: string;
|
container: string;
|
||||||
location?: Location | number; // Hack - BSG data object shows it as Location only
|
location?: ILocation | number; // Hack - BSG data object shows it as Location only
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Location {
|
export interface ILocation {
|
||||||
x: number;
|
x: number;
|
||||||
y: number;
|
y: number;
|
||||||
r: string;
|
r: string;
|
||||||
|
@ -3,10 +3,10 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve
|
|||||||
export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData {
|
export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData {
|
||||||
Action: "CreateMapMarker";
|
Action: "CreateMapMarker";
|
||||||
item: string;
|
item: string;
|
||||||
mapMarker: MapMarker;
|
mapMarker: IMapMarker;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MapMarker {
|
export interface IMapMarker {
|
||||||
Type: string;
|
Type: string;
|
||||||
X: number;
|
X: number;
|
||||||
Y: number;
|
Y: number;
|
||||||
|
@ -5,10 +5,10 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq
|
|||||||
item: string;
|
item: string;
|
||||||
X: number;
|
X: number;
|
||||||
Y: number;
|
Y: number;
|
||||||
mapMarker: MapMarker;
|
mapMarker: IMapMarker;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MapMarker {
|
export interface IMapMarker {
|
||||||
Type: string;
|
Type: string;
|
||||||
X: number;
|
X: number;
|
||||||
Y: number;
|
Y: number;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData";
|
import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData";
|
||||||
|
|
||||||
export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData {
|
export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData {
|
||||||
Action: "Move";
|
Action: "Move";
|
||||||
item: string;
|
item: string;
|
||||||
to: To;
|
to: ITo;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData";
|
import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData";
|
||||||
|
|
||||||
export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData {
|
export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData {
|
||||||
Action: "Split";
|
Action: "Split";
|
||||||
@ -7,6 +7,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD
|
|||||||
/** Id of new item stack */
|
/** Id of new item stack */
|
||||||
newItem: string;
|
newItem: string;
|
||||||
/** Destination new item will be placed in */
|
/** Destination new item will be placed in */
|
||||||
container: Container;
|
container: IContainer;
|
||||||
count: number;
|
count: number;
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData";
|
import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData";
|
||||||
import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData";
|
import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData";
|
||||||
|
|
||||||
export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData {
|
export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData {
|
||||||
Action: "Swap";
|
Action: "Swap";
|
||||||
item: string;
|
item: string;
|
||||||
to: To;
|
to: ITo;
|
||||||
item2: string;
|
item2: string;
|
||||||
to2: To;
|
to2: ITo;
|
||||||
fromOwner2: OwnerInfo;
|
fromOwner2: OwnerInfo;
|
||||||
toOwner2: OwnerInfo;
|
toOwner2: OwnerInfo;
|
||||||
}
|
}
|
||||||
|
@ -4,10 +4,10 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio
|
|||||||
Action: "OpenRandomLootContainer";
|
Action: "OpenRandomLootContainer";
|
||||||
/** Container item id being opened */
|
/** Container item id being opened */
|
||||||
item: string;
|
item: string;
|
||||||
to: To[];
|
to: ITo[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface To {
|
export interface ITo {
|
||||||
/** Player character (pmc/scav) id items will be sent to */
|
/** Player character (pmc/scav) id items will be sent to */
|
||||||
id: string;
|
id: string;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ export interface IProfileChange {
|
|||||||
improvements: Record<string, IHideoutImprovement>;
|
improvements: Record<string, IHideoutImprovement>;
|
||||||
skills: ISkills;
|
skills: ISkills;
|
||||||
health: IHealth;
|
health: IHealth;
|
||||||
traderRelations: Record<string, TraderData>;
|
traderRelations: Record<string, ITraderData>;
|
||||||
moneyTransferLimitData: IMoneyTransferLimits;
|
moneyTransferLimitData: IMoneyTransferLimits;
|
||||||
repeatableQuests?: IPmcDataRepeatableQuest[];
|
repeatableQuests?: IPmcDataRepeatableQuest[];
|
||||||
recipeUnlocked: Record<string, boolean>;
|
recipeUnlocked: Record<string, boolean>;
|
||||||
@ -76,7 +76,7 @@ export interface IItemChanges {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Related to TraderInfo */
|
/** Related to TraderInfo */
|
||||||
export interface TraderData {
|
export interface ITraderData {
|
||||||
salesSum: number;
|
salesSum: number;
|
||||||
standing: number;
|
standing: number;
|
||||||
loyalty: number;
|
loyalty: number;
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
export interface IItemEventRouterRequest {
|
export interface IItemEventRouterRequest {
|
||||||
data: Daum[];
|
data: IDaum[];
|
||||||
tm: number;
|
tm: number;
|
||||||
reload: number;
|
reload: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Daum {
|
export interface IDaum {
|
||||||
Action: string;
|
Action: string;
|
||||||
item: string;
|
item: string;
|
||||||
to: To;
|
to: ITo;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface To {
|
export interface ITo {
|
||||||
id: string;
|
id: string;
|
||||||
container: string;
|
container: string;
|
||||||
location?: Location;
|
location?: ILocation;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Location {
|
export interface ILocation {
|
||||||
x: number;
|
x: number;
|
||||||
y: number;
|
y: number;
|
||||||
r: string;
|
r: string;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Spt } from "../profile/ISptProfile";
|
import { ISpt } from "../profile/ISptProfile";
|
||||||
|
|
||||||
export interface IMiniProfile {
|
export interface IMiniProfile {
|
||||||
username: string;
|
username: string;
|
||||||
@ -11,5 +11,5 @@ export interface IMiniProfile {
|
|||||||
maxlvl: number;
|
maxlvl: number;
|
||||||
edition: string;
|
edition: string;
|
||||||
profileId: string;
|
profileId: string;
|
||||||
sptData: Spt;
|
sptData: ISpt;
|
||||||
}
|
}
|
||||||
|
@ -16,16 +16,16 @@ export interface IRaidSettings {
|
|||||||
isLocationTransition: boolean;
|
isLocationTransition: boolean;
|
||||||
timeVariant: DateTime;
|
timeVariant: DateTime;
|
||||||
metabolismDisabled: boolean;
|
metabolismDisabled: boolean;
|
||||||
timeAndWeatherSettings: TimeAndWeatherSettings;
|
timeAndWeatherSettings: ITimeAndWeatherSettings;
|
||||||
botSettings: BotSettings;
|
botSettings: IBotSettings;
|
||||||
wavesSettings: WavesSettings;
|
wavesSettings: IWavesSettings;
|
||||||
side: SideType;
|
side: SideType;
|
||||||
raidMode: RaidMode;
|
raidMode: RaidMode;
|
||||||
playersSpawnPlace: PlayersSpawnPlace;
|
playersSpawnPlace: PlayersSpawnPlace;
|
||||||
CanShowGroupPreview: boolean;
|
CanShowGroupPreview: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TimeAndWeatherSettings {
|
export interface ITimeAndWeatherSettings {
|
||||||
isRandomTime: boolean;
|
isRandomTime: boolean;
|
||||||
isRandomWeather: boolean;
|
isRandomWeather: boolean;
|
||||||
cloudinessType: CloudinessType;
|
cloudinessType: CloudinessType;
|
||||||
@ -36,12 +36,12 @@ export interface TimeAndWeatherSettings {
|
|||||||
hourOfDay: number;
|
hourOfDay: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BotSettings {
|
export interface IBotSettings {
|
||||||
isScavWars: boolean;
|
isScavWars: boolean;
|
||||||
botAmount: BotAmount;
|
botAmount: BotAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface WavesSettings {
|
export interface IWavesSettings {
|
||||||
botAmount: BotAmount;
|
botAmount: BotAmount;
|
||||||
botDifficulty: BotDifficulty;
|
botDifficulty: BotDifficulty;
|
||||||
isBosses: boolean;
|
isBosses: boolean;
|
||||||
|
@ -7,22 +7,22 @@ import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"
|
|||||||
|
|
||||||
export interface ISptProfile {
|
export interface ISptProfile {
|
||||||
info: Info;
|
info: Info;
|
||||||
characters: Characters;
|
characters: ICharacters;
|
||||||
/** Clothing purchases */
|
/** Clothing purchases */
|
||||||
suits: string[];
|
suits: string[];
|
||||||
userbuilds: IUserBuilds;
|
userbuilds: IUserBuilds;
|
||||||
dialogues: Record<string, Dialogue>;
|
dialogues: Record<string, IDialogue>;
|
||||||
spt: Spt;
|
spt: ISpt;
|
||||||
vitality: Vitality;
|
vitality: IVitality;
|
||||||
inraid: Inraid;
|
inraid: IInraid;
|
||||||
insurance: Insurance[];
|
insurance: IInsurance[];
|
||||||
/** Assort purchases made by player since last trader refresh */
|
/** Assort purchases made by player since last trader refresh */
|
||||||
traderPurchases?: Record<string, Record<string, TraderPurchaseData>>;
|
traderPurchases?: Record<string, Record<string, ITraderPurchaseData>>;
|
||||||
/** Achievements earned by player */
|
/** Achievements earned by player */
|
||||||
achievements: Record<string, number>;
|
achievements: Record<string, number>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class TraderPurchaseData {
|
export class ITraderPurchaseData {
|
||||||
count: number;
|
count: number;
|
||||||
purchaseTimestamp: number;
|
purchaseTimestamp: number;
|
||||||
}
|
}
|
||||||
@ -38,7 +38,7 @@ export interface Info {
|
|||||||
edition: string;
|
edition: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Characters {
|
export interface ICharacters {
|
||||||
pmc: IPmcData;
|
pmc: IPmcData;
|
||||||
scav: IPmcData;
|
scav: IPmcData;
|
||||||
}
|
}
|
||||||
@ -86,13 +86,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild {
|
|||||||
type: string;
|
type: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Dialogue {
|
export interface IDialogue {
|
||||||
attachmentsNew: number;
|
attachmentsNew: number;
|
||||||
new: number;
|
new: number;
|
||||||
type: MessageType;
|
type: MessageType;
|
||||||
Users?: IUserDialogInfo[];
|
Users?: IUserDialogInfo[];
|
||||||
pinned: boolean;
|
pinned: boolean;
|
||||||
messages: Message[];
|
messages: IMessage[];
|
||||||
_id: string;
|
_id: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,17 +111,17 @@ export interface IUserDialogDetails {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// @Cleanup: Maybe the same as Dialogue?
|
// @Cleanup: Maybe the same as Dialogue?
|
||||||
export interface DialogueInfo {
|
export interface IDialogueInfo {
|
||||||
attachmentsNew: number;
|
attachmentsNew: number;
|
||||||
new: number;
|
new: number;
|
||||||
_id: string;
|
_id: string;
|
||||||
type: MessageType;
|
type: MessageType;
|
||||||
pinned: boolean;
|
pinned: boolean;
|
||||||
Users?: IUserDialogInfo[];
|
Users?: IUserDialogInfo[];
|
||||||
message: MessagePreview;
|
message: IMessagePreview;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Message {
|
export interface IMessage {
|
||||||
_id: string;
|
_id: string;
|
||||||
uid: string;
|
uid: string;
|
||||||
type: MessageType;
|
type: MessageType;
|
||||||
@ -133,7 +133,7 @@ export interface Message {
|
|||||||
replyTo?: IReplyTo;
|
replyTo?: IReplyTo;
|
||||||
hasRewards?: boolean;
|
hasRewards?: boolean;
|
||||||
rewardCollected: boolean;
|
rewardCollected: boolean;
|
||||||
items?: MessageItems;
|
items?: IMessageItems;
|
||||||
maxStorageTime?: number;
|
maxStorageTime?: number;
|
||||||
systemData?: ISystemData;
|
systemData?: ISystemData;
|
||||||
profileChangeEvents?: IProfileChangeEvent[];
|
profileChangeEvents?: IProfileChangeEvent[];
|
||||||
@ -147,7 +147,7 @@ export interface IReplyTo {
|
|||||||
text?: string;
|
text?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MessagePreview {
|
export interface IMessagePreview {
|
||||||
uid: string;
|
uid: string;
|
||||||
type: MessageType;
|
type: MessageType;
|
||||||
dt: number;
|
dt: number;
|
||||||
@ -156,7 +156,7 @@ export interface MessagePreview {
|
|||||||
systemData?: ISystemData;
|
systemData?: ISystemData;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MessageItems {
|
export interface IMessageItems {
|
||||||
stash?: string;
|
stash?: string;
|
||||||
data?: IItem[];
|
data?: IItem[];
|
||||||
}
|
}
|
||||||
@ -179,18 +179,13 @@ export interface IUpdatableChatMember {
|
|||||||
Banned: boolean;
|
Banned: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DateTime {
|
export interface ISpt {
|
||||||
date: string;
|
|
||||||
time: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Spt {
|
|
||||||
/** What version of SPT was this profile made with */
|
/** What version of SPT was this profile made with */
|
||||||
version: string;
|
version: string;
|
||||||
/** What mods has this profile loaded at any point in time */
|
/** What mods has this profile loaded at any point in time */
|
||||||
mods?: ModDetails[];
|
mods?: IModDetails[];
|
||||||
/** What gifts has this profile received and how many */
|
/** What gifts has this profile received and how many */
|
||||||
receivedGifts?: ReceivedGift[];
|
receivedGifts?: IReceivedGift[];
|
||||||
/** item TPLs blacklisted from being sold on flea for this profile */
|
/** item TPLs blacklisted from being sold on flea for this profile */
|
||||||
blacklistedItemTpls?: string[];
|
blacklistedItemTpls?: string[];
|
||||||
/** key: daily type */
|
/** key: daily type */
|
||||||
@ -199,7 +194,7 @@ export interface Spt {
|
|||||||
migrations?: Record<string, number>;
|
migrations?: Record<string, number>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ModDetails {
|
export interface IModDetails {
|
||||||
name: string;
|
name: string;
|
||||||
version: string;
|
version: string;
|
||||||
author: string;
|
author: string;
|
||||||
@ -207,18 +202,18 @@ export interface ModDetails {
|
|||||||
url: string;
|
url: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ReceivedGift {
|
export interface IReceivedGift {
|
||||||
giftId: string;
|
giftId: string;
|
||||||
timestampLastAccepted: number;
|
timestampLastAccepted: number;
|
||||||
current: number;
|
current: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Vitality {
|
export interface IVitality {
|
||||||
health: Health;
|
health: IHealth;
|
||||||
effects: Effects;
|
effects: IEffects;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Health {
|
export interface IHealth {
|
||||||
Hydration: number;
|
Hydration: number;
|
||||||
Energy: number;
|
Energy: number;
|
||||||
Temperature: number;
|
Temperature: number;
|
||||||
@ -231,44 +226,44 @@ export interface Health {
|
|||||||
RightLeg: number;
|
RightLeg: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Effects {
|
export interface IEffects {
|
||||||
Head: Head;
|
Head: IHead;
|
||||||
Chest: Chest;
|
Chest: IChest;
|
||||||
Stomach: Stomach;
|
Stomach: IStomach;
|
||||||
LeftArm: LeftArm;
|
LeftArm: ILeftArm;
|
||||||
RightArm: RightArm;
|
RightArm: IRightArm;
|
||||||
LeftLeg: LeftLeg;
|
LeftLeg: ILeftLeg;
|
||||||
RightLeg: RightLeg;
|
RightLeg: IRightLeg;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Head = {};
|
export type IHead = {};
|
||||||
|
|
||||||
export type Chest = {};
|
export type IChest = {};
|
||||||
|
|
||||||
export type Stomach = {};
|
export type IStomach = {};
|
||||||
|
|
||||||
export interface LeftArm {
|
export interface ILeftArm {
|
||||||
Fracture?: number;
|
Fracture?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RightArm {
|
export interface IRightArm {
|
||||||
Fracture?: number;
|
Fracture?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LeftLeg {
|
export interface ILeftLeg {
|
||||||
Fracture?: number;
|
Fracture?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RightLeg {
|
export interface IRightLeg {
|
||||||
Fracture?: number;
|
Fracture?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Inraid {
|
export interface IInraid {
|
||||||
location: string;
|
location: string;
|
||||||
character: string;
|
character: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Insurance {
|
export interface IInsurance {
|
||||||
scheduledTime: number;
|
scheduledTime: number;
|
||||||
traderId: string;
|
traderId: string;
|
||||||
maxStorageTime: number;
|
maxStorageTime: number;
|
||||||
@ -278,7 +273,7 @@ export interface Insurance {
|
|||||||
items: IItem[];
|
items: IItem[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MessageContentRagfair {
|
export interface IMessageContentRagfair {
|
||||||
offerId: string;
|
offerId: string;
|
||||||
count: number;
|
count: number;
|
||||||
handbookId: string;
|
handbookId: string;
|
||||||
|
@ -2,10 +2,10 @@ export interface IAddOfferRequestData {
|
|||||||
Action: string;
|
Action: string;
|
||||||
sellInOnePiece: boolean;
|
sellInOnePiece: boolean;
|
||||||
items: string[];
|
items: string[];
|
||||||
requirements: Requirement[];
|
requirements: IRequirement[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Requirement {
|
export interface IRequirement {
|
||||||
_tpl: string;
|
_tpl: string;
|
||||||
count: number;
|
count: number;
|
||||||
level: number;
|
level: number;
|
||||||
|
@ -6,7 +6,7 @@ export interface IRagfairOffer {
|
|||||||
sellResult?: ISellResult[];
|
sellResult?: ISellResult[];
|
||||||
_id: string;
|
_id: string;
|
||||||
items: IItem[];
|
items: IItem[];
|
||||||
requirements: OfferRequirement[];
|
requirements: IOfferRequirement[];
|
||||||
root: string;
|
root: string;
|
||||||
intId: number;
|
intId: number;
|
||||||
/** Handbook price */
|
/** Handbook price */
|
||||||
@ -29,7 +29,7 @@ export interface IRagfairOffer {
|
|||||||
locked?: boolean;
|
locked?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface OfferRequirement {
|
export interface IOfferRequirement {
|
||||||
_tpl: string;
|
_tpl: string;
|
||||||
count: number;
|
count: number;
|
||||||
onlyFunctional: boolean;
|
onlyFunctional: boolean;
|
||||||
|
@ -2,11 +2,11 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair
|
|||||||
|
|
||||||
export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest {
|
export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest {
|
||||||
Action: "Repair";
|
Action: "Repair";
|
||||||
repairKitsInfo: RepairKitsInfo[];
|
repairKitsInfo: IRepairKitsInfo[];
|
||||||
target: string; // item to repair
|
target: string; // item to repair
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RepairKitsInfo {
|
export interface IRepairKitsInfo {
|
||||||
_id: string; // id of repair kit to use
|
_id: string; // id of repair kit to use
|
||||||
count: number; // amout of units to reduce kit by
|
count: number; // amout of units to reduce kit by
|
||||||
}
|
}
|
||||||
|
@ -3,10 +3,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair
|
|||||||
export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest {
|
export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest {
|
||||||
Action: "TraderRepair";
|
Action: "TraderRepair";
|
||||||
tid: string;
|
tid: string;
|
||||||
repairItems: RepairItem[];
|
repairItems: IRepairItem[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RepairItem {
|
export interface IRepairItem {
|
||||||
_id: string;
|
_id: string;
|
||||||
count: number;
|
count: number;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter";
|
import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter";
|
||||||
import { Message } from "@spt/models/eft/profile/ISptProfile";
|
import { IMessage } from "@spt/models/eft/profile/ISptProfile";
|
||||||
import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent";
|
import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent";
|
||||||
|
|
||||||
export interface IWsChatMessageReceived extends IWsNotificationEvent {
|
export interface IWsChatMessageReceived extends IWsNotificationEvent {
|
||||||
dialogId: string;
|
dialogId: string;
|
||||||
message: Message;
|
message: IMessage;
|
||||||
profiles?: IGroupCharacter[];
|
profiles?: IGroupCharacter[];
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { MinMax } from "@spt/models/common/MinMax";
|
import { MinMax } from "@spt/models/common/MinMax";
|
||||||
|
|
||||||
export interface BotGenerationDetails {
|
export interface IBotGenerationDetails {
|
||||||
/** Should the bot be generated as a PMC */
|
/** Should the bot be generated as a PMC */
|
||||||
isPmc: boolean;
|
isPmc: boolean;
|
||||||
/** assault/pmcBot etc */
|
/** assault/pmcBot etc */
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase";
|
import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase";
|
||||||
import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType";
|
import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType";
|
||||||
import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig";
|
import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig";
|
||||||
import { IBotData } from "./IGenerateWeaponRequest";
|
import { IBotData } from "./IGenerateWeaponRequest";
|
||||||
|
|
||||||
export interface IGenerateEquipmentProperties {
|
export interface IGenerateEquipmentProperties {
|
||||||
@ -16,7 +16,7 @@ export interface IGenerateEquipmentProperties {
|
|||||||
inventory: PmcInventory;
|
inventory: PmcInventory;
|
||||||
botEquipmentConfig: EquipmentFilters;
|
botEquipmentConfig: EquipmentFilters;
|
||||||
/** Settings from bot.json to adjust how item is generated */
|
/** Settings from bot.json to adjust how item is generated */
|
||||||
randomisationDetails: RandomisationDetails;
|
randomisationDetails: IRandomisationDetails;
|
||||||
/** OPTIONAL - Do not generate mods for tpls in this array */
|
/** OPTIONAL - Do not generate mods for tpls in this array */
|
||||||
generateModsBlacklist?: string[];
|
generateModsBlacklist?: string[];
|
||||||
generatingPlayerLevel: number;
|
generatingPlayerLevel: number;
|
||||||
|
@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem";
|
|||||||
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
||||||
import { ModSpawn } from "@spt/models/enums/ModSpawn";
|
import { ModSpawn } from "@spt/models/enums/ModSpawn";
|
||||||
import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest";
|
import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest";
|
||||||
import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig";
|
import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig";
|
||||||
|
|
||||||
export interface IModToSpawnRequest {
|
export interface IModToSpawnRequest {
|
||||||
/** Slot mod will fit into */
|
/** Slot mod will fit into */
|
||||||
@ -12,7 +12,7 @@ export interface IModToSpawnRequest {
|
|||||||
/** Parent slot the item will be a part of */
|
/** Parent slot the item will be a part of */
|
||||||
botWeaponSightWhitelist: Record<string, string[]>;
|
botWeaponSightWhitelist: Record<string, string[]>;
|
||||||
/** Blacklist to prevent mods from being picked */
|
/** Blacklist to prevent mods from being picked */
|
||||||
botEquipBlacklist: EquipmentFilterDetails;
|
botEquipBlacklist: IEquipmentFilterDetails;
|
||||||
/** Pool of items to pick from */
|
/** Pool of items to pick from */
|
||||||
itemModPool: Record<string, string[]>;
|
itemModPool: Record<string, string[]>;
|
||||||
/** Array with only weapon tpl in it, ready for mods to be added */
|
/** Array with only weapon tpl in it, ready for mods to be added */
|
||||||
|
@ -14,7 +14,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"
|
|||||||
import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData";
|
import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData";
|
||||||
import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData";
|
import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData";
|
||||||
import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile";
|
import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||||
|
|
||||||
export interface IDialogueCallbacks {
|
export interface IDialogueCallbacks {
|
||||||
getFriendList(
|
getFriendList(
|
||||||
@ -27,7 +27,7 @@ export interface IDialogueCallbacks {
|
|||||||
url: string,
|
url: string,
|
||||||
info: IGetMailDialogListRequestData,
|
info: IGetMailDialogListRequestData,
|
||||||
sessionID: string,
|
sessionID: string,
|
||||||
): IGetBodyResponseData<DialogueInfo[]>;
|
): IGetBodyResponseData<IDialogueInfo[]>;
|
||||||
getMailDialogView(
|
getMailDialogView(
|
||||||
url: string,
|
url: string,
|
||||||
info: IGetMailDialogViewRequestData,
|
info: IGetMailDialogViewRequestData,
|
||||||
|
@ -6,7 +6,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability";
|
|||||||
export interface IBotConfig extends IBaseConfig {
|
export interface IBotConfig extends IBaseConfig {
|
||||||
kind: "spt-bot";
|
kind: "spt-bot";
|
||||||
/** How many variants of each bot should be generated on raid start */
|
/** How many variants of each bot should be generated on raid start */
|
||||||
presetBatch: PresetBatch;
|
presetBatch: IPresetBatch;
|
||||||
/** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */
|
/** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */
|
||||||
botsToNotAddPMCsAsEnemiesTo: string[];
|
botsToNotAddPMCsAsEnemiesTo: string[];
|
||||||
/** What bot types should be classified as bosses */
|
/** What bot types should be classified as bosses */
|
||||||
@ -58,7 +58,7 @@ export interface IAssaultToBossConversion {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 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 IPresetBatch {
|
||||||
assault: number;
|
assault: number;
|
||||||
bossBully: number;
|
bossBully: number;
|
||||||
bossGluhar: number;
|
bossGluhar: number;
|
||||||
@ -109,7 +109,7 @@ export interface IWalletLootSettings {
|
|||||||
|
|
||||||
export interface EquipmentFilters {
|
export interface EquipmentFilters {
|
||||||
/** Limits for mod types per weapon .e.g. scopes */
|
/** Limits for mod types per weapon .e.g. scopes */
|
||||||
weaponModLimits: ModLimits;
|
weaponModLimits: IModLimits;
|
||||||
/** Whitelist for weapon sight types allowed per gun */
|
/** Whitelist for weapon sight types allowed per gun */
|
||||||
weaponSightWhitelist: Record<string, string[]>;
|
weaponSightWhitelist: Record<string, string[]>;
|
||||||
/** Chance face shield is down/active */
|
/** Chance face shield is down/active */
|
||||||
@ -130,29 +130,29 @@ export interface EquipmentFilters {
|
|||||||
/** What additional slot ids should be seen as required when choosing a mod to add to a weapon */
|
/** What additional slot ids should be seen as required when choosing a mod to add to a weapon */
|
||||||
weaponSlotIdsToMakeRequired?: string[];
|
weaponSlotIdsToMakeRequired?: string[];
|
||||||
/** Adjust weighting/chances of items on bot by level of bot */
|
/** Adjust weighting/chances of items on bot by level of bot */
|
||||||
randomisation: RandomisationDetails[];
|
randomisation: IRandomisationDetails[];
|
||||||
/** Blacklist equipment by level of bot */
|
/** Blacklist equipment by level of bot */
|
||||||
blacklist: EquipmentFilterDetails[];
|
blacklist: IEquipmentFilterDetails[];
|
||||||
/** Whitelist equipment by level of bot */
|
/** Whitelist equipment by level of bot */
|
||||||
whitelist: EquipmentFilterDetails[];
|
whitelist: IEquipmentFilterDetails[];
|
||||||
/** Adjust equipment/ammo */
|
/** Adjust equipment/ammo */
|
||||||
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[];
|
||||||
/** Same as weightingAdjustments but based on player level instead of bot level */
|
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||||
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[];
|
||||||
/** Should the stock mod be forced to spawn on bot */
|
/** Should the stock mod be forced to spawn on bot */
|
||||||
forceStock?: boolean;
|
forceStock?: boolean;
|
||||||
armorPlateWeighting?: IArmorPlateWeights[];
|
armorPlateWeighting?: IArmorPlateWeights[];
|
||||||
forceRigWhenNoVest?: boolean;
|
forceRigWhenNoVest?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ModLimits {
|
export interface IModLimits {
|
||||||
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
||||||
scopeLimit?: number;
|
scopeLimit?: number;
|
||||||
/** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */
|
/** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */
|
||||||
lightLaserLimit?: number;
|
lightLaserLimit?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RandomisationDetails {
|
export interface IRandomisationDetails {
|
||||||
/** Between what levels do these randomisation setting apply to */
|
/** Between what levels do these randomisation setting apply to */
|
||||||
levelRange: MinMax;
|
levelRange: MinMax;
|
||||||
generation?: Record<string, IGenerationData>;
|
generation?: Record<string, IGenerationData>;
|
||||||
@ -175,7 +175,7 @@ export interface INighttimeChanges {
|
|||||||
//weaponModsModifiers: Record<string, number>; //TODO
|
//weaponModsModifiers: Record<string, number>; //TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface EquipmentFilterDetails {
|
export interface IEquipmentFilterDetails {
|
||||||
/** Between what levels do these equipment filter setting apply to */
|
/** Between what levels do these equipment filter setting apply to */
|
||||||
levelRange: MinMax;
|
levelRange: MinMax;
|
||||||
/** Key: mod slot name e.g. mod_magazine, value: item tpls */
|
/** Key: mod slot name e.g. mod_magazine, value: item tpls */
|
||||||
@ -184,7 +184,7 @@ export interface EquipmentFilterDetails {
|
|||||||
cartridge: Record<string, string[]>;
|
cartridge: Record<string, string[]>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface WeightingAdjustmentDetails {
|
export interface IWeightingAdjustmentDetails {
|
||||||
/** Between what levels do these weight settings apply to */
|
/** Between what levels do these weight settings apply to */
|
||||||
levelRange: MinMax;
|
levelRange: MinMax;
|
||||||
/** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */
|
/** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
export interface IBotDurability {
|
export interface IBotDurability {
|
||||||
default: IDefaultDurability;
|
default: IDefaultDurability;
|
||||||
pmc: PmcDurability;
|
pmc: IPmcDurability;
|
||||||
boss: IBotDurability;
|
boss: IBotDurability;
|
||||||
follower: IBotDurability;
|
follower: IBotDurability;
|
||||||
assault: IBotDurability;
|
assault: IBotDurability;
|
||||||
@ -22,7 +22,7 @@ export interface IDefaultDurability {
|
|||||||
weapon: IWeaponDurability;
|
weapon: IWeaponDurability;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PmcDurability {
|
export interface IPmcDurability {
|
||||||
armor: IPmcDurabilityArmor;
|
armor: IPmcDurabilityArmor;
|
||||||
weapon: IWeaponDurability;
|
weapon: IWeaponDurability;
|
||||||
}
|
}
|
||||||
|
@ -2,16 +2,16 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig";
|
|||||||
|
|
||||||
export interface IHealthConfig extends IBaseConfig {
|
export interface IHealthConfig extends IBaseConfig {
|
||||||
kind: "spt-health";
|
kind: "spt-health";
|
||||||
healthMultipliers: HealthMultipliers;
|
healthMultipliers: IHealthMultipliers;
|
||||||
save: Save;
|
save: ISave;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface HealthMultipliers {
|
export interface IHealthMultipliers {
|
||||||
death: number;
|
death: number;
|
||||||
blacked: number;
|
blacked: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Save {
|
export interface ISave {
|
||||||
health: boolean;
|
health: boolean;
|
||||||
effects: boolean;
|
effects: boolean;
|
||||||
}
|
}
|
||||||
|
@ -20,11 +20,11 @@ export interface ICultistCircleSettings {
|
|||||||
maxRewardItemCount: number;
|
maxRewardItemCount: number;
|
||||||
maxAttemptsToPickRewardsWithinBudget: number;
|
maxAttemptsToPickRewardsWithinBudget: number;
|
||||||
rewardPriceMultiplerMinMax: MinMax;
|
rewardPriceMultiplerMinMax: MinMax;
|
||||||
craftTimeThreshholds: CraftTimeThreshhold[];
|
craftTimeThreshholds: ICraftTimeThreshhold[];
|
||||||
/** -1 means no override */
|
/** -1 means no override */
|
||||||
craftTimeOverride: number;
|
craftTimeOverride: number;
|
||||||
/** Specific reward pool when player sacrificed one specific item */
|
/** Specific reward pool when player sacrificed one specific item */
|
||||||
directRewards: Record<string, DirectRewardSettings>;
|
directRewards: Record<string, IDirectRewardSettings>;
|
||||||
directRewardStackSize: Record<string, MinMax>;
|
directRewardStackSize: Record<string, MinMax>;
|
||||||
/** Item tpls to exclude from the reward pool */
|
/** Item tpls to exclude from the reward pool */
|
||||||
rewardItemBlacklist: string[];
|
rewardItemBlacklist: string[];
|
||||||
@ -33,11 +33,11 @@ export interface ICultistCircleSettings {
|
|||||||
currencyRewards: Record<string, MinMax>;
|
currencyRewards: Record<string, MinMax>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CraftTimeThreshhold extends MinMax {
|
export interface ICraftTimeThreshhold extends MinMax {
|
||||||
craftTimeSeconds: number;
|
craftTimeSeconds: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DirectRewardSettings {
|
export interface IDirectRewardSettings {
|
||||||
rewardTpls: string[];
|
rewardTpls: string[];
|
||||||
craftTimeSeconds: number;
|
craftTimeSeconds: number;
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig";
|
|||||||
export interface IInRaidConfig extends IBaseConfig {
|
export interface IInRaidConfig extends IBaseConfig {
|
||||||
kind: "spt-inraid";
|
kind: "spt-inraid";
|
||||||
/** Overrides to apply to the pre-raid settings screen */
|
/** Overrides to apply to the pre-raid settings screen */
|
||||||
raidMenuSettings: RaidMenuSettings;
|
raidMenuSettings: IRaidMenuSettings;
|
||||||
/** What effects should be saved post-raid */
|
/** What effects should be saved post-raid */
|
||||||
save: Save;
|
save: ISave;
|
||||||
/** Names of car extracts */
|
/** Names of car extracts */
|
||||||
carExtracts: string[];
|
carExtracts: string[];
|
||||||
/** Names of coop extracts */
|
/** Names of coop extracts */
|
||||||
@ -26,7 +26,7 @@ export interface IInRaidConfig extends IBaseConfig {
|
|||||||
playerScavHostileChancePercent: number;
|
playerScavHostileChancePercent: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RaidMenuSettings {
|
export interface IRaidMenuSettings {
|
||||||
aiAmount: string;
|
aiAmount: string;
|
||||||
aiDifficulty: string;
|
aiDifficulty: string;
|
||||||
bossEnabled: boolean;
|
bossEnabled: boolean;
|
||||||
@ -37,7 +37,7 @@ export interface RaidMenuSettings {
|
|||||||
randomTime: boolean;
|
randomTime: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Save {
|
export interface ISave {
|
||||||
/** Should loot gained from raid be saved */
|
/** Should loot gained from raid be saved */
|
||||||
loot: boolean;
|
loot: boolean;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ export interface IInventoryConfig extends IBaseConfig {
|
|||||||
kind: "spt-inventory";
|
kind: "spt-inventory";
|
||||||
/** Should new items purchased by flagged as found in raid */
|
/** Should new items purchased by flagged as found in raid */
|
||||||
newItemsMarkedFound: boolean;
|
newItemsMarkedFound: boolean;
|
||||||
randomLootContainers: Record<string, RewardDetails>;
|
randomLootContainers: Record<string, IRewardDetails>;
|
||||||
sealedAirdropContainer: ISealedAirdropContainerSettings;
|
sealedAirdropContainer: ISealedAirdropContainerSettings;
|
||||||
/** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */
|
/** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */
|
||||||
customMoneyTpls: string[];
|
customMoneyTpls: string[];
|
||||||
@ -13,7 +13,7 @@ export interface IInventoryConfig extends IBaseConfig {
|
|||||||
skillGainMultiplers: Record<string, number>;
|
skillGainMultiplers: Record<string, number>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RewardDetails {
|
export interface IRewardDetails {
|
||||||
rewardCount: number;
|
rewardCount: number;
|
||||||
foundInRaid: boolean;
|
foundInRaid: boolean;
|
||||||
rewardTplPool?: Record<string, number>;
|
rewardTplPool?: Record<string, number>;
|
||||||
|
@ -3,18 +3,18 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig";
|
|||||||
|
|
||||||
export interface IPlayerScavConfig extends IBaseConfig {
|
export interface IPlayerScavConfig extends IBaseConfig {
|
||||||
kind: "spt-playerscav";
|
kind: "spt-playerscav";
|
||||||
karmaLevel: Record<string, KarmaLevel>;
|
karmaLevel: Record<string, IKarmaLevel>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface KarmaLevel {
|
export interface IKarmaLevel {
|
||||||
botTypeForLoot: string;
|
botTypeForLoot: string;
|
||||||
modifiers: Modifiers;
|
modifiers: IModifiers;
|
||||||
itemLimits: ItemLimits;
|
itemLimits: ItemLimits;
|
||||||
equipmentBlacklist: Record<string, string[]>;
|
equipmentBlacklist: Record<string, string[]>;
|
||||||
lootItemsToAddChancePercent: Record<string, number>;
|
lootItemsToAddChancePercent: Record<string, number>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Modifiers {
|
export interface IModifiers {
|
||||||
equipment: Record<string, number>;
|
equipment: Record<string, number>;
|
||||||
mod: Record<string, number>;
|
mod: Record<string, number>;
|
||||||
}
|
}
|
||||||
|
@ -10,11 +10,11 @@ export interface IPmcConfig extends IBaseConfig {
|
|||||||
/** What account type should the PMC have */
|
/** What account type should the PMC have */
|
||||||
accountTypeWeight: Record<MemberCategory, number>;
|
accountTypeWeight: Record<MemberCategory, number>;
|
||||||
/** Global whitelist/blacklist of vest loot for PMCs */
|
/** Global whitelist/blacklist of vest loot for PMCs */
|
||||||
vestLoot: SlotLootSettings;
|
vestLoot: ISlotLootSettings;
|
||||||
/** Global whitelist/blacklist of pocket loot for PMCs */
|
/** Global whitelist/blacklist of pocket loot for PMCs */
|
||||||
pocketLoot: SlotLootSettings;
|
pocketLoot: ISlotLootSettings;
|
||||||
/** Global whitelist/blacklist of backpack loot for PMCs */
|
/** Global whitelist/blacklist of backpack loot for PMCs */
|
||||||
backpackLoot: SlotLootSettings;
|
backpackLoot: ISlotLootSettings;
|
||||||
/** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */
|
/** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */
|
||||||
useDifficultyOverride: boolean;
|
useDifficultyOverride: boolean;
|
||||||
/** Difficulty override e.g. "AsOnline/Hard" */
|
/** Difficulty override e.g. "AsOnline/Hard" */
|
||||||
@ -33,7 +33,7 @@ export interface IPmcConfig extends IBaseConfig {
|
|||||||
bearType: string;
|
bearType: string;
|
||||||
/** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */
|
/** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */
|
||||||
pmcType: Record<string, Record<string, Record<string, number>>>;
|
pmcType: Record<string, Record<string, Record<string, number>>>;
|
||||||
maxBackpackLootTotalRub: MinMaxLootValue[];
|
maxBackpackLootTotalRub: IMinMaxLootValue[];
|
||||||
maxPocketLootTotalRub: number;
|
maxPocketLootTotalRub: number;
|
||||||
maxVestLootTotalRub: number;
|
maxVestLootTotalRub: number;
|
||||||
/** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */
|
/** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */
|
||||||
@ -64,16 +64,16 @@ export interface IHostilitySettings {
|
|||||||
savagePlayerBehaviour?: string;
|
savagePlayerBehaviour?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PmcTypes {
|
export interface IPmcTypes {
|
||||||
usec: string;
|
usec: string;
|
||||||
bear: string;
|
bear: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SlotLootSettings {
|
export interface ISlotLootSettings {
|
||||||
whitelist: string[];
|
whitelist: string[];
|
||||||
blacklist: string[];
|
blacklist: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MinMaxLootValue extends MinMax {
|
export interface IMinMaxLootValue extends MinMax {
|
||||||
value: number;
|
value: number;
|
||||||
}
|
}
|
||||||
|
@ -8,14 +8,14 @@ export interface IRagfairConfig extends IBaseConfig {
|
|||||||
/** Default values used to hydrate `runIntervalSeconds` with */
|
/** Default values used to hydrate `runIntervalSeconds` with */
|
||||||
runIntervalValues: IRunIntervalValues;
|
runIntervalValues: IRunIntervalValues;
|
||||||
/** Player listing settings */
|
/** Player listing settings */
|
||||||
sell: Sell;
|
sell: ISell;
|
||||||
/** Trader ids + should their assorts be listed on flea */
|
/** Trader ids + should their assorts be listed on flea */
|
||||||
traders: Record<string, boolean>;
|
traders: Record<string, boolean>;
|
||||||
dynamic: Dynamic;
|
dynamic: IDynamic;
|
||||||
tieredFlea: ITieredFlea;
|
tieredFlea: ITieredFlea;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Sell {
|
export interface ISell {
|
||||||
/** Should a fee be deducted from player when liting an item for sale */
|
/** Should a fee be deducted from player when liting an item for sale */
|
||||||
fees: boolean;
|
fees: boolean;
|
||||||
/** Settings to control chances of offer being sold */
|
/** Settings to control chances of offer being sold */
|
||||||
@ -37,7 +37,7 @@ export interface Chance {
|
|||||||
minSellChancePercent: number;
|
minSellChancePercent: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Dynamic {
|
export interface IDynamic {
|
||||||
// Should a purchased dynamic offers items be flagged as found in raid
|
// Should a purchased dynamic offers items be flagged as found in raid
|
||||||
purchasesAreFoundInRaid: boolean;
|
purchasesAreFoundInRaid: boolean;
|
||||||
/** Use the highest trader price for an offer if its greater than the price in templates/prices.json */
|
/** Use the highest trader price for an offer if its greater than the price in templates/prices.json */
|
||||||
@ -46,7 +46,7 @@ export interface Dynamic {
|
|||||||
barter: IBarterDetails;
|
barter: IBarterDetails;
|
||||||
pack: IPackDetails;
|
pack: IPackDetails;
|
||||||
/** Dynamic offer price below handbook adjustment values */
|
/** Dynamic offer price below handbook adjustment values */
|
||||||
offerAdjustment: OfferAdjustment;
|
offerAdjustment: IOfferAdjustment;
|
||||||
/** How many offers should expire before an offer regeneration occurs */
|
/** How many offers should expire before an offer regeneration occurs */
|
||||||
expiredOfferThreshold: number;
|
expiredOfferThreshold: number;
|
||||||
/** How many offers should be listed */
|
/** How many offers should be listed */
|
||||||
@ -75,7 +75,7 @@ export interface Dynamic {
|
|||||||
/** Should christmas/halloween items be removed from flea when not within the seasonal bounds */
|
/** Should christmas/halloween items be removed from flea when not within the seasonal bounds */
|
||||||
removeSeasonalItemsWhenNotInEvent: boolean;
|
removeSeasonalItemsWhenNotInEvent: boolean;
|
||||||
/** Flea blacklist settings */
|
/** Flea blacklist settings */
|
||||||
blacklist: Blacklist;
|
blacklist: IRagfairBlacklist;
|
||||||
/** Dict of price limits keyed by item type */
|
/** Dict of price limits keyed by item type */
|
||||||
unreasonableModPrices: Record<string, IUnreasonableModPrices>;
|
unreasonableModPrices: Record<string, IUnreasonableModPrices>;
|
||||||
}
|
}
|
||||||
@ -112,7 +112,7 @@ export interface IPackDetails {
|
|||||||
itemTypeWhitelist: string[];
|
itemTypeWhitelist: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface OfferAdjustment {
|
export interface IOfferAdjustment {
|
||||||
/** Shuld offer price be adjusted when below handbook price */
|
/** Shuld offer price be adjusted when below handbook price */
|
||||||
adjustPriceWhenBelowHandbookPrice: boolean;
|
adjustPriceWhenBelowHandbookPrice: boolean;
|
||||||
/** How big a percentage difference does price need to vary from handbook to be considered for adjustment */
|
/** How big a percentage difference does price need to vary from handbook to be considered for adjustment */
|
||||||
@ -130,7 +130,7 @@ export interface Condition {
|
|||||||
max: MinMax;
|
max: MinMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Blacklist {
|
export interface IRagfairBlacklist {
|
||||||
/** Damaged ammo packs */
|
/** Damaged ammo packs */
|
||||||
damagedAmmoPacks: boolean;
|
damagedAmmoPacks: boolean;
|
||||||
/** Custom blacklist for item Tpls */
|
/** Custom blacklist for item Tpls */
|
||||||
|
@ -12,7 +12,7 @@ export interface IRepairConfig extends IBaseConfig {
|
|||||||
// ** How much INT can be given to player per repair action */
|
// ** How much INT can be given to player per repair action */
|
||||||
maxIntellectGainPerRepair: IMaxIntellectGainValues;
|
maxIntellectGainPerRepair: IMaxIntellectGainValues;
|
||||||
weaponTreatment: IWeaponTreatmentRepairValues;
|
weaponTreatment: IWeaponTreatmentRepairValues;
|
||||||
repairKit: RepairKit;
|
repairKit: IRepairKit;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IIntellectGainValues {
|
export interface IIntellectGainValues {
|
||||||
@ -36,19 +36,19 @@ export interface IWeaponTreatmentRepairValues {
|
|||||||
pointGainMultiplier: number;
|
pointGainMultiplier: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RepairKit {
|
export interface IRepairKit {
|
||||||
armor: BonusSettings;
|
armor: IBonusSettings;
|
||||||
weapon: BonusSettings;
|
weapon: IBonusSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BonusSettings {
|
export interface IBonusSettings {
|
||||||
rarityWeight: Record<string, number>;
|
rarityWeight: Record<string, number>;
|
||||||
bonusTypeWeight: Record<string, number>;
|
bonusTypeWeight: Record<string, number>;
|
||||||
common: Record<string, BonusValues>;
|
common: Record<string, IBonusValues>;
|
||||||
rare: Record<string, BonusValues>;
|
rare: Record<string, IBonusValues>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BonusValues {
|
export interface IBonusValues {
|
||||||
valuesMinMax: MinMax;
|
valuesMinMax: MinMax;
|
||||||
/** What dura is buff active between (min max of current max) */
|
/** What dura is buff active between (min max of current max) */
|
||||||
activeDurabilityPercentMinMax: MinMax;
|
activeDurabilityPercentMinMax: MinMax;
|
||||||
|
@ -4,24 +4,24 @@ import { ILootRequest } from "@spt/models/spt/services/ILootRequest";
|
|||||||
|
|
||||||
export interface ITraderConfig extends IBaseConfig {
|
export interface ITraderConfig extends IBaseConfig {
|
||||||
kind: "spt-trader";
|
kind: "spt-trader";
|
||||||
updateTime: UpdateTime[];
|
updateTime: IUpdateTime[];
|
||||||
purchasesAreFoundInRaid: boolean;
|
purchasesAreFoundInRaid: boolean;
|
||||||
/** Should trader reset times be set based on server start time (false = bsg time - on the hour) */
|
/** Should trader reset times be set based on server start time (false = bsg time - on the hour) */
|
||||||
tradersResetFromServerStart: boolean;
|
tradersResetFromServerStart: boolean;
|
||||||
updateTimeDefault: number;
|
updateTimeDefault: number;
|
||||||
traderPriceMultipler: number;
|
traderPriceMultipler: number;
|
||||||
fence: FenceConfig;
|
fence: IFenceConfig;
|
||||||
moddedTraders: ModdedTraders;
|
moddedTraders: IModdedTraders;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UpdateTime {
|
export interface IUpdateTime {
|
||||||
traderId: string;
|
traderId: string;
|
||||||
/** Seconds between trader resets */
|
/** Seconds between trader resets */
|
||||||
seconds: MinMax;
|
seconds: MinMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FenceConfig {
|
export interface IFenceConfig {
|
||||||
discountOptions: DiscountOptions;
|
discountOptions: IDiscountOptions;
|
||||||
partialRefreshTimeSeconds: number;
|
partialRefreshTimeSeconds: number;
|
||||||
partialRefreshChangePercent: number;
|
partialRefreshChangePercent: number;
|
||||||
assortSize: number;
|
assortSize: number;
|
||||||
@ -48,7 +48,7 @@ export interface FenceConfig {
|
|||||||
/** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */
|
/** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */
|
||||||
ammoMaxPenLimit: number;
|
ammoMaxPenLimit: number;
|
||||||
blacklist: string[];
|
blacklist: string[];
|
||||||
coopExtractGift: CoopExtractReward;
|
coopExtractGift: ICoopExtractReward;
|
||||||
btrDeliveryExpireHours: number;
|
btrDeliveryExpireHours: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,13 +57,13 @@ export interface IItemDurabilityCurrentMax {
|
|||||||
max: MinMax;
|
max: MinMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CoopExtractReward extends ILootRequest {
|
export interface ICoopExtractReward extends ILootRequest {
|
||||||
sendGift: boolean;
|
sendGift: boolean;
|
||||||
messageLocaleIds: string[];
|
messageLocaleIds: string[];
|
||||||
giftExpiryHours: number;
|
giftExpiryHours: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DiscountOptions {
|
export interface IDiscountOptions {
|
||||||
assortSize: number;
|
assortSize: number;
|
||||||
itemPriceMult: number;
|
itemPriceMult: number;
|
||||||
presetPriceMult: number;
|
presetPriceMult: number;
|
||||||
@ -72,7 +72,7 @@ export interface DiscountOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Custom trader data needed client side for things such as the clothing service */
|
/** Custom trader data needed client side for things such as the clothing service */
|
||||||
export interface ModdedTraders {
|
export interface IModdedTraders {
|
||||||
/** Trader Ids to enable the clothing service for */
|
/** Trader Ids to enable the clothing service for */
|
||||||
clothingService: string[];
|
clothingService: string[];
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { IItem } from "@spt/models/eft/common/tables/IItem";
|
import { IItem } from "@spt/models/eft/common/tables/IItem";
|
||||||
import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile";
|
import { IMessageContentRagfair, ISystemData, IUserDialogInfo } 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";
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ export interface ISendMessageDetails {
|
|||||||
/** Optional - ragfair related */
|
/** Optional - ragfair related */
|
||||||
systemData?: ISystemData;
|
systemData?: ISystemData;
|
||||||
/** Optional - Used by ragfair messages */
|
/** Optional - Used by ragfair messages */
|
||||||
ragfairDetails?: MessageContentRagfair;
|
ragfairDetails?: IMessageContentRagfair;
|
||||||
/** OPTIONAL - allows modification of profile settings via mail */
|
/** OPTIONAL - allows modification of profile settings via mail */
|
||||||
profileChangeEvents?: IProfileChangeEvent[];
|
profileChangeEvents?: IProfileChangeEvent[];
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
export interface ScavCaseRewardCountsAndPrices {
|
export interface IScavCaseRewardCountsAndPrices {
|
||||||
Common: RewardCountAndPriceDetails;
|
Common: IRewardCountAndPriceDetails;
|
||||||
Rare: RewardCountAndPriceDetails;
|
Rare: IRewardCountAndPriceDetails;
|
||||||
Superrare: RewardCountAndPriceDetails;
|
Superrare: IRewardCountAndPriceDetails;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RewardCountAndPriceDetails {
|
export interface IRewardCountAndPriceDetails {
|
||||||
minCount: number;
|
minCount: number;
|
||||||
maxCount: number;
|
maxCount: number;
|
||||||
minPriceRub: number;
|
minPriceRub: number;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem";
|
import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
||||||
|
|
||||||
export abstract class NewItemDetailsBase {
|
export abstract class NewItemDetailsBase {
|
||||||
/** Price of the item on flea market */
|
/** Price of the item on flea market */
|
||||||
@ -22,7 +22,7 @@ export class NewItemFromCloneDetails extends NewItemDetailsBase {
|
|||||||
itemTplToClone: string;
|
itemTplToClone: string;
|
||||||
|
|
||||||
/** Item properties that should be applied over the top of the cloned base */
|
/** Item properties that should be applied over the top of the cloned base */
|
||||||
overrideProperties: Props;
|
overrideProperties: IProps;
|
||||||
|
|
||||||
/** ParentId for the new item (item type) */
|
/** ParentId for the new item (item type) */
|
||||||
parentId: string;
|
parentId: string;
|
||||||
|
@ -1,26 +1,26 @@
|
|||||||
export interface ISettingsBase {
|
export interface ISettingsBase {
|
||||||
config: Config;
|
config: IConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Config {
|
export interface IConfig {
|
||||||
AFKTimeoutSeconds: number;
|
AFKTimeoutSeconds: number;
|
||||||
AdditionalRandomDelaySeconds: number;
|
AdditionalRandomDelaySeconds: number;
|
||||||
ClientSendRateLimit: number;
|
ClientSendRateLimit: number;
|
||||||
CriticalRetriesCount: number;
|
CriticalRetriesCount: number;
|
||||||
DefaultRetriesCount: number;
|
DefaultRetriesCount: number;
|
||||||
FirstCycleDelaySeconds: number;
|
FirstCycleDelaySeconds: number;
|
||||||
FramerateLimit: FramerateLimit;
|
FramerateLimit: IFramerateLimit;
|
||||||
GroupStatusInterval: number;
|
GroupStatusInterval: number;
|
||||||
GroupStatusButtonInterval: number;
|
GroupStatusButtonInterval: number;
|
||||||
KeepAliveInterval: number;
|
KeepAliveInterval: number;
|
||||||
LobbyKeepAliveInterval: number;
|
LobbyKeepAliveInterval: number;
|
||||||
Mark502and504AsNonImportant: boolean;
|
Mark502and504AsNonImportant: boolean;
|
||||||
MemoryManagementSettings: MemoryManagementSettings;
|
MemoryManagementSettings: IMemoryManagementSettings;
|
||||||
NVidiaHighlights: boolean;
|
NVidiaHighlights: boolean;
|
||||||
NextCycleDelaySeconds: number;
|
NextCycleDelaySeconds: number;
|
||||||
PingServerResultSendInterval: number;
|
PingServerResultSendInterval: number;
|
||||||
PingServersInterval: number;
|
PingServersInterval: number;
|
||||||
ReleaseProfiler: ReleaseProfiler;
|
ReleaseProfiler: IReleaseProfiler;
|
||||||
RequestConfirmationTimeouts: number[];
|
RequestConfirmationTimeouts: number[];
|
||||||
RequestsMadeThroughLobby: string[];
|
RequestsMadeThroughLobby: string[];
|
||||||
SecondCycleDelaySeconds: number;
|
SecondCycleDelaySeconds: number;
|
||||||
@ -32,13 +32,13 @@ export interface Config {
|
|||||||
WsReconnectionDelays: string[];
|
WsReconnectionDelays: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FramerateLimit {
|
export interface IFramerateLimit {
|
||||||
MaxFramerateGameLimit: number;
|
MaxFramerateGameLimit: number;
|
||||||
MaxFramerateLobbyLimit: number;
|
MaxFramerateLobbyLimit: number;
|
||||||
MinFramerateLimit: number;
|
MinFramerateLimit: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MemoryManagementSettings {
|
export interface IMemoryManagementSettings {
|
||||||
AggressiveGC: boolean;
|
AggressiveGC: boolean;
|
||||||
GigabytesRequiredToDisableGCDuringRaid: number;
|
GigabytesRequiredToDisableGCDuringRaid: number;
|
||||||
HeapPreAllocationEnabled: boolean;
|
HeapPreAllocationEnabled: boolean;
|
||||||
@ -47,7 +47,7 @@ export interface MemoryManagementSettings {
|
|||||||
RamCleanerEnabled: boolean;
|
RamCleanerEnabled: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ReleaseProfiler {
|
export interface IReleaseProfiler {
|
||||||
Enabled: boolean;
|
Enabled: boolean;
|
||||||
MaxRecords: number;
|
MaxRecords: number;
|
||||||
RecordTriggerValue: number;
|
RecordTriggerValue: number;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest";
|
import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest";
|
||||||
import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor";
|
import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor";
|
||||||
import { LogTextColor } from "@spt/models/spt/logging/LogTextColor";
|
import { LogTextColor } from "@spt/models/spt/logging/LogTextColor";
|
||||||
|
|
||||||
export interface ILogger {
|
export interface ILogger {
|
||||||
writeToLogFile(data: string | Daum): void;
|
writeToLogFile(data: string | IDaum): void;
|
||||||
log(data: string | Record<string, unknown> | Error, color: string, backgroundColor?: string): void;
|
log(data: string | Record<string, unknown> | Error, color: string, backgroundColor?: string): void;
|
||||||
logWithColor(
|
logWithColor(
|
||||||
data: string | Record<string, unknown>,
|
data: string | Record<string, unknown>,
|
||||||
|
@ -6,7 +6,7 @@ import {
|
|||||||
IProductive,
|
IProductive,
|
||||||
ITraderInfo,
|
ITraderInfo,
|
||||||
} from "@spt/models/eft/common/tables/IBotBase";
|
} from "@spt/models/eft/common/tables/IBotBase";
|
||||||
import { IProfileChange, TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase";
|
import { IProfileChange, ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase";
|
||||||
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { TimeUtil } from "@spt/utils/TimeUtil";
|
import { TimeUtil } from "@spt/utils/TimeUtil";
|
||||||
import { ICloner } from "@spt/utils/cloners/ICloner";
|
import { ICloner } from "@spt/utils/cloners/ICloner";
|
||||||
@ -103,8 +103,8 @@ export class EventOutputHolder {
|
|||||||
* @param traderData server data for traders
|
* @param traderData server data for traders
|
||||||
* @returns dict of trader id + TraderData
|
* @returns dict of trader id + TraderData
|
||||||
*/
|
*/
|
||||||
protected constructTraderRelations(traderData: Record<string, ITraderInfo>): Record<string, TraderData> {
|
protected constructTraderRelations(traderData: Record<string, ITraderInfo>): Record<string, ITraderData> {
|
||||||
const result: Record<string, TraderData> = {};
|
const result: Record<string, ITraderData> = {};
|
||||||
|
|
||||||
for (const traderId in traderData) {
|
for (const traderId in traderData) {
|
||||||
const baseData = traderData[traderId];
|
const baseData = traderData[traderId];
|
||||||
|
@ -11,7 +11,7 @@ import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailD
|
|||||||
import { IRemoveUserGroupMailRequest } from "@spt/models/eft/dialog/IRemoveUserGroupMailRequest";
|
import { IRemoveUserGroupMailRequest } from "@spt/models/eft/dialog/IRemoveUserGroupMailRequest";
|
||||||
import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData";
|
import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData";
|
||||||
import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile";
|
import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||||
import { inject, injectable } from "tsyringe";
|
import { inject, injectable } from "tsyringe";
|
||||||
|
|
||||||
@injectable()
|
@injectable()
|
||||||
@ -36,7 +36,7 @@ export class DialogStaticRouter extends StaticRouter {
|
|||||||
info: any,
|
info: any,
|
||||||
sessionID: string,
|
sessionID: string,
|
||||||
output: string,
|
output: string,
|
||||||
): Promise<IGetBodyResponseData<DialogueInfo[]>> => {
|
): Promise<IGetBodyResponseData<IDialogueInfo[]>> => {
|
||||||
return this.dialogueCallbacks.getMailDialogList(url, info, sessionID);
|
return this.dialogueCallbacks.getMailDialogList(url, info, sessionID);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -58,7 +58,7 @@ export class DialogStaticRouter extends StaticRouter {
|
|||||||
info: any,
|
info: any,
|
||||||
sessionID: string,
|
sessionID: string,
|
||||||
output: string,
|
output: string,
|
||||||
): Promise<IGetBodyResponseData<DialogueInfo>> => {
|
): Promise<IGetBodyResponseData<IDialogueInfo>> => {
|
||||||
return this.dialogueCallbacks.getMailDialogInfo(url, info, sessionID);
|
return this.dialogueCallbacks.getMailDialogInfo(url, info, sessionID);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -2,7 +2,7 @@ import { TraderCallbacks } from "@spt/callbacks/TraderCallbacks";
|
|||||||
import { RouteAction, StaticRouter } from "@spt/di/Router";
|
import { RouteAction, StaticRouter } from "@spt/di/Router";
|
||||||
import { ITraderBase } from "@spt/models/eft/common/tables/ITrader";
|
import { ITraderBase } from "@spt/models/eft/common/tables/ITrader";
|
||||||
import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig";
|
import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig";
|
||||||
import { inject, injectable } from "tsyringe";
|
import { inject, injectable } from "tsyringe";
|
||||||
|
|
||||||
@injectable()
|
@injectable()
|
||||||
@ -27,7 +27,7 @@ export class TraderStaticRouter extends StaticRouter {
|
|||||||
info: any,
|
info: any,
|
||||||
sessionID: string,
|
sessionID: string,
|
||||||
output: string,
|
output: string,
|
||||||
): Promise<IGetBodyResponseData<ModdedTraders>> => {
|
): Promise<IGetBodyResponseData<IModdedTraders>> => {
|
||||||
return this.traderCallbacks.getModdedTraderData(url, info, sessionID);
|
return this.traderCallbacks.getModdedTraderData(url, info, sessionID);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -8,13 +8,13 @@ import {
|
|||||||
IModsChances,
|
IModsChances,
|
||||||
} from "@spt/models/eft/common/tables/IBotType";
|
} from "@spt/models/eft/common/tables/IBotType";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
||||||
import {
|
import {
|
||||||
EquipmentFilterDetails,
|
|
||||||
EquipmentFilters,
|
EquipmentFilters,
|
||||||
IAdjustmentDetails,
|
IAdjustmentDetails,
|
||||||
IBotConfig,
|
IBotConfig,
|
||||||
WeightingAdjustmentDetails,
|
IEquipmentFilterDetails,
|
||||||
|
IWeightingAdjustmentDetails,
|
||||||
} from "@spt/models/spt/config/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";
|
||||||
@ -46,7 +46,7 @@ export class BotEquipmentFilterService {
|
|||||||
sessionId: string,
|
sessionId: string,
|
||||||
baseBotNode: IBotType,
|
baseBotNode: IBotType,
|
||||||
botLevel: number,
|
botLevel: number,
|
||||||
botGenerationDetails: BotGenerationDetails,
|
botGenerationDetails: IBotGenerationDetails,
|
||||||
): void {
|
): void {
|
||||||
const pmcProfile = this.profileHelper.getPmcProfile(sessionId);
|
const pmcProfile = this.profileHelper.getPmcProfile(sessionId);
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ export class BotEquipmentFilterService {
|
|||||||
* @param playerLevel Level of the player
|
* @param playerLevel Level of the player
|
||||||
* @returns EquipmentBlacklistDetails object
|
* @returns EquipmentBlacklistDetails object
|
||||||
*/
|
*/
|
||||||
public getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined {
|
public getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined {
|
||||||
const blacklistDetailsForBot = this.botEquipmentConfig[botRole];
|
const blacklistDetailsForBot = this.botEquipmentConfig[botRole];
|
||||||
|
|
||||||
// No equipment blacklist found, skip
|
// No equipment blacklist found, skip
|
||||||
@ -177,7 +177,7 @@ export class BotEquipmentFilterService {
|
|||||||
* @param playerLevel Players level
|
* @param playerLevel Players level
|
||||||
* @returns EquipmentFilterDetails object
|
* @returns EquipmentFilterDetails object
|
||||||
*/
|
*/
|
||||||
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined {
|
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined {
|
||||||
const botEquipmentConfig = this.botEquipmentConfig[botRole];
|
const botEquipmentConfig = this.botEquipmentConfig[botRole];
|
||||||
|
|
||||||
// No equipment blacklist found, skip
|
// No equipment blacklist found, skip
|
||||||
@ -196,7 +196,7 @@ export class BotEquipmentFilterService {
|
|||||||
* @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 | undefined {
|
protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined {
|
||||||
const botEquipmentConfig = this.botEquipmentConfig[botRole];
|
const botEquipmentConfig = this.botEquipmentConfig[botRole];
|
||||||
|
|
||||||
// No config found, skip
|
// No config found, skip
|
||||||
@ -222,7 +222,7 @@ export class BotEquipmentFilterService {
|
|||||||
protected getBotWeightingAdjustmentsByPlayerLevel(
|
protected getBotWeightingAdjustmentsByPlayerLevel(
|
||||||
botRole: string,
|
botRole: string,
|
||||||
playerlevel: number,
|
playerlevel: number,
|
||||||
): WeightingAdjustmentDetails | undefined {
|
): IWeightingAdjustmentDetails | undefined {
|
||||||
const botEquipmentConfig = this.botEquipmentConfig[botRole];
|
const botEquipmentConfig = this.botEquipmentConfig[botRole];
|
||||||
|
|
||||||
// No config found, skip
|
// No config found, skip
|
||||||
@ -248,8 +248,8 @@ export class BotEquipmentFilterService {
|
|||||||
*/
|
*/
|
||||||
protected filterEquipment(
|
protected filterEquipment(
|
||||||
baseBotNode: IBotType,
|
baseBotNode: IBotType,
|
||||||
blacklist: EquipmentFilterDetails,
|
blacklist: IEquipmentFilterDetails,
|
||||||
whitelist: EquipmentFilterDetails,
|
whitelist: IEquipmentFilterDetails,
|
||||||
): void {
|
): void {
|
||||||
if (whitelist) {
|
if (whitelist) {
|
||||||
for (const equipmentSlotKey in baseBotNode.inventory.equipment) {
|
for (const equipmentSlotKey in baseBotNode.inventory.equipment) {
|
||||||
@ -304,8 +304,8 @@ export class BotEquipmentFilterService {
|
|||||||
*/
|
*/
|
||||||
protected filterCartridges(
|
protected filterCartridges(
|
||||||
baseBotNode: IBotType,
|
baseBotNode: IBotType,
|
||||||
blacklist: EquipmentFilterDetails,
|
blacklist: IEquipmentFilterDetails,
|
||||||
whitelist: EquipmentFilterDetails,
|
whitelist: IEquipmentFilterDetails,
|
||||||
): void {
|
): void {
|
||||||
if (whitelist) {
|
if (whitelist) {
|
||||||
for (const ammoCaliberKey in baseBotNode.inventory.Ammo) {
|
for (const ammoCaliberKey in baseBotNode.inventory.Ammo) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator";
|
import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator";
|
||||||
import { ItemHelper } from "@spt/helpers/ItemHelper";
|
import { ItemHelper } from "@spt/helpers/ItemHelper";
|
||||||
import { IBotType } from "@spt/models/eft/common/tables/IBotType";
|
import { IBotType } from "@spt/models/eft/common/tables/IBotType";
|
||||||
import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem";
|
import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
||||||
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
||||||
import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache";
|
import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
@ -421,7 +421,7 @@ export class BotLootCacheService {
|
|||||||
* @param props
|
* @param props
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
protected isBulletOrGrenade(props: Props): boolean {
|
protected isBulletOrGrenade(props: IProps): boolean {
|
||||||
return "ammoType" in props;
|
return "ammoType" in props;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -430,7 +430,7 @@ export class BotLootCacheService {
|
|||||||
* @param props
|
* @param props
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
protected isMagazine(props: Props): boolean {
|
protected isMagazine(props: IProps): boolean {
|
||||||
return "ReloadMagType" in props;
|
return "ReloadMagType" in props;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -439,7 +439,7 @@ export class BotLootCacheService {
|
|||||||
* @param props
|
* @param props
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
protected isMedicalItem(props: Props): boolean {
|
protected isMedicalItem(props: IProps): boolean {
|
||||||
return "medUseTime" in props;
|
return "medUseTime" in props;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -448,7 +448,7 @@ export class BotLootCacheService {
|
|||||||
* @param props
|
* @param props
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
protected isGrenade(props: Props): boolean {
|
protected isGrenade(props: IProps): boolean {
|
||||||
return "ThrowType" in props;
|
return "ThrowType" in props;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import { BotHelper } from "@spt/helpers/BotHelper";
|
|||||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||||
import { IBotType } from "@spt/models/eft/common/tables/IBotType";
|
import { IBotType } from "@spt/models/eft/common/tables/IBotType";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
||||||
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
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";
|
||||||
@ -53,7 +53,7 @@ export class BotNameService {
|
|||||||
*/
|
*/
|
||||||
public generateUniqueBotNickname(
|
public generateUniqueBotNickname(
|
||||||
botJsonTemplate: IBotType,
|
botJsonTemplate: IBotType,
|
||||||
botGenerationDetails: BotGenerationDetails,
|
botGenerationDetails: IBotGenerationDetails,
|
||||||
botRole: string,
|
botRole: string,
|
||||||
uniqueRoles?: string[],
|
uniqueRoles?: string[],
|
||||||
): string {
|
): string {
|
||||||
|
@ -11,8 +11,8 @@ import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/e
|
|||||||
import {
|
import {
|
||||||
IHideoutProduction,
|
IHideoutProduction,
|
||||||
IHideoutProductionData,
|
IHideoutProductionData,
|
||||||
|
IRequirement,
|
||||||
IRequirementBase,
|
IRequirementBase,
|
||||||
Requirement,
|
|
||||||
} from "@spt/models/eft/hideout/IHideoutProduction";
|
} from "@spt/models/eft/hideout/IHideoutProduction";
|
||||||
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
||||||
@ -20,7 +20,7 @@ import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
|||||||
import { HideoutAreas } from "@spt/models/enums/HideoutAreas";
|
import { HideoutAreas } from "@spt/models/enums/HideoutAreas";
|
||||||
import { ItemTpl } from "@spt/models/enums/ItemTpl";
|
import { ItemTpl } from "@spt/models/enums/ItemTpl";
|
||||||
import { SkillTypes } from "@spt/models/enums/SkillTypes";
|
import { SkillTypes } from "@spt/models/enums/SkillTypes";
|
||||||
import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig";
|
import { IDirectRewardSettings, 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";
|
||||||
@ -175,7 +175,7 @@ export class CircleOfCultistService {
|
|||||||
recipeId: string,
|
recipeId: string,
|
||||||
sacrificedItems: IItem[],
|
sacrificedItems: IItem[],
|
||||||
rewardAmountRoubles: number,
|
rewardAmountRoubles: number,
|
||||||
directRewardSettings?: DirectRewardSettings,
|
directRewardSettings?: IDirectRewardSettings,
|
||||||
): void {
|
): void {
|
||||||
// Create circle production/craft object to add to player profile
|
// Create circle production/craft object to add to player profile
|
||||||
const cultistProduction = this.hideoutHelper.initProduction(
|
const cultistProduction = this.hideoutHelper.initProduction(
|
||||||
@ -203,7 +203,7 @@ export class CircleOfCultistService {
|
|||||||
*/
|
*/
|
||||||
protected getCircleCraftTimeSeconds(
|
protected getCircleCraftTimeSeconds(
|
||||||
rewardAmountRoubles: number,
|
rewardAmountRoubles: number,
|
||||||
directRewardSettings?: DirectRewardSettings,
|
directRewardSettings?: IDirectRewardSettings,
|
||||||
): number {
|
): number {
|
||||||
// Edge case, check if override exists
|
// Edge case, check if override exists
|
||||||
if (this.hideoutConfig.cultistCircle.craftTimeOverride !== -1) {
|
if (this.hideoutConfig.cultistCircle.craftTimeOverride !== -1) {
|
||||||
@ -346,7 +346,7 @@ export class CircleOfCultistService {
|
|||||||
* @returns Array of item arrays
|
* @returns Array of item arrays
|
||||||
*/
|
*/
|
||||||
protected getExplicitRewards(
|
protected getExplicitRewards(
|
||||||
explicitRewardSettings: DirectRewardSettings,
|
explicitRewardSettings: IDirectRewardSettings,
|
||||||
cultistCircleStashId: string,
|
cultistCircleStashId: string,
|
||||||
): IItem[][] {
|
): IItem[][] {
|
||||||
// Prep rewards array (reward can be item with children, hence array of arrays)
|
// Prep rewards array (reward can be item with children, hence array of arrays)
|
||||||
@ -573,7 +573,7 @@ export class CircleOfCultistService {
|
|||||||
* @param requirements Requirements to iterate over
|
* @param requirements Requirements to iterate over
|
||||||
* @returns Array of item requirements
|
* @returns Array of item requirements
|
||||||
*/
|
*/
|
||||||
protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[] {
|
protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[] {
|
||||||
return requirements.filter((requirement) => requirement.type === "Item");
|
return requirements.filter((requirement) => requirement.type === "Item");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,12 +5,12 @@ import { NotifierHelper } from "@spt/helpers/NotifierHelper";
|
|||||||
import { TraderHelper } from "@spt/helpers/TraderHelper";
|
import { TraderHelper } from "@spt/helpers/TraderHelper";
|
||||||
import { IItem } from "@spt/models/eft/common/tables/IItem";
|
import { IItem } from "@spt/models/eft/common/tables/IItem";
|
||||||
import {
|
import {
|
||||||
Dialogue,
|
IDialogue,
|
||||||
|
IMessage,
|
||||||
|
IMessageContentRagfair,
|
||||||
|
IMessageItems,
|
||||||
ISystemData,
|
ISystemData,
|
||||||
IUserDialogInfo,
|
IUserDialogInfo,
|
||||||
Message,
|
|
||||||
MessageContentRagfair,
|
|
||||||
MessageItems,
|
|
||||||
} from "@spt/models/eft/profile/ISptProfile";
|
} from "@spt/models/eft/profile/ISptProfile";
|
||||||
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
||||||
import { MessageType } from "@spt/models/enums/MessageType";
|
import { MessageType } from "@spt/models/enums/MessageType";
|
||||||
@ -59,7 +59,7 @@ export class MailSendService {
|
|||||||
items: IItem[] = [],
|
items: IItem[] = [],
|
||||||
maxStorageTimeSeconds?: number,
|
maxStorageTimeSeconds?: number,
|
||||||
systemData?: ISystemData,
|
systemData?: ISystemData,
|
||||||
ragfair?: MessageContentRagfair,
|
ragfair?: IMessageContentRagfair,
|
||||||
): void {
|
): void {
|
||||||
if (!trader) {
|
if (!trader) {
|
||||||
this.logger.error(
|
this.logger.error(
|
||||||
@ -114,7 +114,7 @@ export class MailSendService {
|
|||||||
items: IItem[] = [],
|
items: IItem[] = [],
|
||||||
maxStorageTimeSeconds?: number,
|
maxStorageTimeSeconds?: number,
|
||||||
systemData?: ISystemData,
|
systemData?: ISystemData,
|
||||||
ragfair?: MessageContentRagfair,
|
ragfair?: IMessageContentRagfair,
|
||||||
): void {
|
): void {
|
||||||
if (!trader) {
|
if (!trader) {
|
||||||
this.logger.error(
|
this.logger.error(
|
||||||
@ -334,8 +334,8 @@ export class MailSendService {
|
|||||||
* @param messageDetails Various details on what the message must contain/do
|
* @param messageDetails Various details on what the message must contain/do
|
||||||
* @returns Message
|
* @returns Message
|
||||||
*/
|
*/
|
||||||
protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message {
|
protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage {
|
||||||
const message: Message = {
|
const message: IMessage = {
|
||||||
_id: this.hashUtil.generate(),
|
_id: this.hashUtil.generate(),
|
||||||
uid: dialogId, // must match the dialog id
|
uid: dialogId, // must match the dialog id
|
||||||
type: messageDetails.sender, // Same enum is used for defining dialog type + message type, thanks bsg
|
type: messageDetails.sender, // Same enum is used for defining dialog type + message type, thanks bsg
|
||||||
@ -369,8 +369,8 @@ export class MailSendService {
|
|||||||
* @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(
|
protected addRewardItemsToMessage(
|
||||||
message: Message,
|
message: IMessage,
|
||||||
itemsToSendToPlayer: MessageItems | undefined,
|
itemsToSendToPlayer: IMessageItems | undefined,
|
||||||
maxStorageTimeSeconds: number | undefined,
|
maxStorageTimeSeconds: number | undefined,
|
||||||
): void {
|
): void {
|
||||||
if ((itemsToSendToPlayer?.data?.length ?? 0) > 0) {
|
if ((itemsToSendToPlayer?.data?.length ?? 0) > 0) {
|
||||||
@ -390,10 +390,10 @@ export class MailSendService {
|
|||||||
protected processItemsBeforeAddingToMail(
|
protected processItemsBeforeAddingToMail(
|
||||||
dialogType: MessageType,
|
dialogType: MessageType,
|
||||||
messageDetails: ISendMessageDetails,
|
messageDetails: ISendMessageDetails,
|
||||||
): MessageItems {
|
): IMessageItems {
|
||||||
const items = this.databaseService.getItems();
|
const items = this.databaseService.getItems();
|
||||||
|
|
||||||
let itemsToSendToPlayer: MessageItems = {};
|
let itemsToSendToPlayer: IMessageItems = {};
|
||||||
if ((messageDetails.items?.length ?? 0) > 0) {
|
if ((messageDetails.items?.length ?? 0) > 0) {
|
||||||
// Find base item that should be the 'primary' + have its parent id be used as the dialogs 'stash' value
|
// Find base item that should be the 'primary' + have its parent id be used as the dialogs 'stash' value
|
||||||
const parentItem = this.getBaseItemFromRewards(messageDetails.items);
|
const parentItem = this.getBaseItemFromRewards(messageDetails.items);
|
||||||
@ -500,7 +500,7 @@ export class MailSendService {
|
|||||||
* @param messageDetails Data on what message should do
|
* @param messageDetails Data on what message should do
|
||||||
* @returns Relevant Dialogue
|
* @returns Relevant Dialogue
|
||||||
*/
|
*/
|
||||||
protected getDialog(messageDetails: ISendMessageDetails): Dialogue {
|
protected getDialog(messageDetails: ISendMessageDetails): IDialogue {
|
||||||
const dialogsInProfile = this.dialogueHelper.getDialogsForProfile(messageDetails.recipientId);
|
const dialogsInProfile = this.dialogueHelper.getDialogsForProfile(messageDetails.recipientId);
|
||||||
const senderId = this.getMessageSenderIdByType(messageDetails);
|
const senderId = this.getMessageSenderIdByType(messageDetails);
|
||||||
if (!senderId) {
|
if (!senderId) {
|
||||||
|
@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
|||||||
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase";
|
import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase";
|
||||||
import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
|
import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
|
||||||
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
||||||
import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea";
|
import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea";
|
||||||
import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile";
|
import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile";
|
||||||
import { BonusType } from "@spt/models/enums/BonusType";
|
import { BonusType } from "@spt/models/enums/BonusType";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
@ -632,7 +632,7 @@ export class ProfileFixerService {
|
|||||||
* @param bonus bonus to find
|
* @param bonus bonus to find
|
||||||
* @returns matching bonus
|
* @returns matching bonus
|
||||||
*/
|
*/
|
||||||
protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined {
|
protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined {
|
||||||
// match by id first, used by "TextBonus" bonuses
|
// match by id first, used by "TextBonus" bonuses
|
||||||
if (bonus.id) {
|
if (bonus.id) {
|
||||||
return profileBonuses.find((x) => x.id === bonus.id);
|
return profileBonuses.find((x) => x.id === bonus.id);
|
||||||
|
@ -8,15 +8,15 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
|||||||
import { IItem } from "@spt/models/eft/common/tables/IItem";
|
import { IItem } from "@spt/models/eft/common/tables/IItem";
|
||||||
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
||||||
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest";
|
import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest";
|
||||||
import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest";
|
import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest";
|
||||||
import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData";
|
import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData";
|
||||||
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
||||||
import { BonusType } from "@spt/models/enums/BonusType";
|
import { BonusType } from "@spt/models/enums/BonusType";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
import { Money } from "@spt/models/enums/Money";
|
import { Money } from "@spt/models/enums/Money";
|
||||||
import { SkillTypes } from "@spt/models/enums/SkillTypes";
|
import { SkillTypes } from "@spt/models/enums/SkillTypes";
|
||||||
import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig";
|
import { IBonusSettings, 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 { DatabaseService } from "@spt/services/DatabaseService";
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
@ -55,7 +55,7 @@ export class RepairService {
|
|||||||
public repairItemByTrader(
|
public repairItemByTrader(
|
||||||
sessionID: string,
|
sessionID: string,
|
||||||
pmcData: IPmcData,
|
pmcData: IPmcData,
|
||||||
repairItemDetails: RepairItem,
|
repairItemDetails: IRepairItem,
|
||||||
traderId: string,
|
traderId: string,
|
||||||
): RepairDetails {
|
): RepairDetails {
|
||||||
const itemToRepair = pmcData.Inventory.items.find((item) => item._id === repairItemDetails._id);
|
const itemToRepair = pmcData.Inventory.items.find((item) => item._id === repairItemDetails._id);
|
||||||
@ -288,7 +288,7 @@ export class RepairService {
|
|||||||
public repairItemByKit(
|
public repairItemByKit(
|
||||||
sessionId: string,
|
sessionId: string,
|
||||||
pmcData: IPmcData,
|
pmcData: IPmcData,
|
||||||
repairKits: RepairKitsInfo[],
|
repairKits: IRepairKitsInfo[],
|
||||||
itemToRepairId: string,
|
itemToRepairId: string,
|
||||||
output: IItemEventRouterResponse,
|
output: IItemEventRouterResponse,
|
||||||
): RepairDetails {
|
): RepairDetails {
|
||||||
@ -470,7 +470,7 @@ export class RepairService {
|
|||||||
* @param itemConfig weapon/armor config
|
* @param itemConfig weapon/armor config
|
||||||
* @param repairDetails Details for item to repair
|
* @param repairDetails Details for item to repair
|
||||||
*/
|
*/
|
||||||
public addBuff(itemConfig: BonusSettings, item: IItem): void {
|
public addBuff(itemConfig: IBonusSettings, item: IItem): void {
|
||||||
const bonusRarity = this.weightedRandomHelper.getWeightedValue<string>(itemConfig.rarityWeight);
|
const bonusRarity = this.weightedRandomHelper.getWeightedValue<string>(itemConfig.rarityWeight);
|
||||||
const bonusType = this.weightedRandomHelper.getWeightedValue<string>(itemConfig.bonusTypeWeight);
|
const bonusType = this.weightedRandomHelper.getWeightedValue<string>(itemConfig.bonusTypeWeight);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||||
import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile";
|
import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
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";
|
||||||
@ -36,7 +36,7 @@ export class TraderPurchasePersisterService {
|
|||||||
public getProfileTraderPurchases(
|
public getProfileTraderPurchases(
|
||||||
sessionId: string,
|
sessionId: string,
|
||||||
traderId: string,
|
traderId: string,
|
||||||
): Record<string, TraderPurchaseData> | undefined {
|
): Record<string, ITraderPurchaseData> | undefined {
|
||||||
const profile = this.profileHelper.getFullProfile(sessionId);
|
const profile = this.profileHelper.getFullProfile(sessionId);
|
||||||
|
|
||||||
if (!profile.traderPurchases) {
|
if (!profile.traderPurchases) {
|
||||||
@ -57,7 +57,7 @@ export class TraderPurchasePersisterService {
|
|||||||
sessionId: string,
|
sessionId: string,
|
||||||
traderId: string,
|
traderId: string,
|
||||||
assortId: string,
|
assortId: string,
|
||||||
): TraderPurchaseData | undefined {
|
): ITraderPurchaseData | undefined {
|
||||||
const profile = this.profileHelper.getFullProfile(sessionId);
|
const profile = this.profileHelper.getFullProfile(sessionId);
|
||||||
|
|
||||||
if (!profile.traderPurchases) {
|
if (!profile.traderPurchases) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { ItemHelper } from "@spt/helpers/ItemHelper";
|
import { ItemHelper } from "@spt/helpers/ItemHelper";
|
||||||
import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem";
|
import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
||||||
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
||||||
import { ItemTpl } from "@spt/models/enums/ItemTpl";
|
import { ItemTpl } from "@spt/models/enums/ItemTpl";
|
||||||
import {
|
import {
|
||||||
@ -137,7 +137,7 @@ export class CustomItemService {
|
|||||||
* @param overrideProperties new properties to apply
|
* @param overrideProperties new properties to apply
|
||||||
* @param itemClone item to update
|
* @param itemClone item to update
|
||||||
*/
|
*/
|
||||||
protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void {
|
protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void {
|
||||||
for (const propKey in overrideProperties) {
|
for (const propKey in overrideProperties) {
|
||||||
itemClone._props[propKey] = overrideProperties[propKey];
|
itemClone._props[propKey] = overrideProperties[propKey];
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import path from "node:path";
|
|
||||||
import crypto from "node:crypto";
|
import crypto from "node:crypto";
|
||||||
import fs from "node:fs";
|
import fs from "node:fs";
|
||||||
|
import path from "node:path";
|
||||||
import { promisify } from "node:util";
|
import { promisify } from "node:util";
|
||||||
import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest";
|
import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest";
|
||||||
import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor";
|
import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor";
|
||||||
import { LogTextColor } from "@spt/models/spt/logging/LogTextColor";
|
import { LogTextColor } from "@spt/models/spt/logging/LogTextColor";
|
||||||
import { SptLogger } from "@spt/models/spt/logging/SptLogger";
|
import { SptLogger } from "@spt/models/spt/logging/SptLogger";
|
||||||
@ -112,7 +112,7 @@ export abstract class AbstractWinstonLogger implements ILogger {
|
|||||||
return "14d";
|
return "14d";
|
||||||
}
|
}
|
||||||
|
|
||||||
public async writeToLogFile(data: string | Daum): Promise<void> {
|
public async writeToLogFile(data: string | IDaum): Promise<void> {
|
||||||
const command: ICommand = {
|
const command: ICommand = {
|
||||||
uuid: crypto.randomUUID(),
|
uuid: crypto.randomUUID(),
|
||||||
cmd: async () => await this.writeFilePromisify(this.filePath, `${data}\n`, true),
|
cmd: async () => await this.writeFilePromisify(this.filePath, `${data}\n`, true),
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import "reflect-metadata";
|
import "reflect-metadata";
|
||||||
|
|
||||||
import { ItemHelper } from "@spt/helpers/ItemHelper";
|
import { ItemHelper } from "@spt/helpers/ItemHelper";
|
||||||
import { Insurance } from "@spt/models/eft/profile/ISptProfile";
|
import { IInsurance } from "@spt/models/eft/profile/ISptProfile";
|
||||||
import { profileInsuranceFixture } from "@tests/__fixture__/profileInsurance.fixture";
|
import { profileInsuranceFixture } from "@tests/__fixture__/profileInsurance.fixture";
|
||||||
import { format } from "date-fns";
|
import { format } from "date-fns";
|
||||||
import { container } from "tsyringe";
|
import { container } from "tsyringe";
|
||||||
@ -9,7 +9,7 @@ import { container } from "tsyringe";
|
|||||||
type DateInput = number | number[] | { [index: number]: number };
|
type DateInput = number | number[] | { [index: number]: number };
|
||||||
|
|
||||||
export class ProfileInsuranceFactory {
|
export class ProfileInsuranceFactory {
|
||||||
private profileInsuranceFixture: Insurance[];
|
private profileInsuranceFixture: IInsurance[];
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.init();
|
this.init();
|
||||||
@ -74,7 +74,7 @@ export class ProfileInsuranceFactory {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get(): Insurance[] {
|
public get(): IInsurance[] {
|
||||||
return this.profileInsuranceFixture;
|
return this.profileInsuranceFixture;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Insurance } from "@spt/models/eft/profile/ISptProfile";
|
import { IInsurance } from "@spt/models/eft/profile/ISptProfile";
|
||||||
|
|
||||||
export const profileInsuranceFixture: Insurance[] = [
|
export const profileInsuranceFixture: IInsurance[] = [
|
||||||
{
|
{
|
||||||
scheduledTime: 1712950044.4,
|
scheduledTime: 1712950044.4,
|
||||||
traderId: "54cb50c76803fa8b248b4571",
|
traderId: "54cb50c76803fa8b248b4571",
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest";
|
import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest";
|
||||||
import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor";
|
import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor";
|
||||||
import { LogTextColor } from "@spt/models/spt/logging/LogTextColor";
|
import { LogTextColor } from "@spt/models/spt/logging/LogTextColor";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
|
|
||||||
export class WinstonLogger implements ILogger {
|
export class WinstonLogger implements ILogger {
|
||||||
writeToLogFile(data: string | Daum): void {}
|
writeToLogFile(data: string | IDaum): void {}
|
||||||
|
|
||||||
log(data: string | Record<string, unknown> | Error, color: string, backgroundColor?: string): void {}
|
log(data: string | Record<string, unknown> | Error, color: string, backgroundColor?: string): void {}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import "reflect-metadata";
|
|||||||
|
|
||||||
import { InsuranceController } from "@spt/controllers/InsuranceController";
|
import { InsuranceController } from "@spt/controllers/InsuranceController";
|
||||||
import { IItem } from "@spt/models/eft/common/tables/IItem";
|
import { IItem } from "@spt/models/eft/common/tables/IItem";
|
||||||
import { Insurance } from "@spt/models/eft/profile/ISptProfile";
|
import { IInsurance } from "@spt/models/eft/profile/ISptProfile";
|
||||||
import { MessageType } from "@spt/models/enums/MessageType";
|
import { MessageType } from "@spt/models/enums/MessageType";
|
||||||
import { ProfileInsuranceFactory } from "@tests/__factories__/ProfileInsurance.factory";
|
import { ProfileInsuranceFactory } from "@tests/__factories__/ProfileInsurance.factory";
|
||||||
import { container } from "tsyringe";
|
import { container } from "tsyringe";
|
||||||
@ -10,7 +10,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|||||||
|
|
||||||
describe("InsuranceController", () => {
|
describe("InsuranceController", () => {
|
||||||
let insuranceController: any; // Using "any" to access private/protected methods without type errors.
|
let insuranceController: any; // Using "any" to access private/protected methods without type errors.
|
||||||
let insuranceFixture: Insurance[];
|
let insuranceFixture: IInsurance[];
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
insuranceController = container.resolve<InsuranceController>("InsuranceController");
|
insuranceController = container.resolve<InsuranceController>("InsuranceController");
|
||||||
|
@ -2,7 +2,7 @@ import "reflect-metadata";
|
|||||||
|
|
||||||
import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator";
|
import { BotLevelGenerator } from "@spt/generators/BotLevelGenerator";
|
||||||
import { MinMax } from "@spt/models/common/MinMax";
|
import { MinMax } from "@spt/models/common/MinMax";
|
||||||
import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
||||||
import { container } from "tsyringe";
|
import { container } from "tsyringe";
|
||||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ describe("BotLevelGenerator", () => {
|
|||||||
it("should return value between 5 and 10 when player is level 5 and max is 10", () => {
|
it("should return value between 5 and 10 when player is level 5 and max is 10", () => {
|
||||||
const levelDetails: MinMax = { min: 5, max: 10 };
|
const levelDetails: MinMax = { min: 5, max: 10 };
|
||||||
|
|
||||||
const botGenerationDetails: BotGenerationDetails = {
|
const botGenerationDetails: IBotGenerationDetails = {
|
||||||
isPmc: false,
|
isPmc: false,
|
||||||
role: "",
|
role: "",
|
||||||
side: "",
|
side: "",
|
||||||
@ -42,7 +42,7 @@ describe("BotLevelGenerator", () => {
|
|||||||
describe("getRelativeBotLevelRange", () => {
|
describe("getRelativeBotLevelRange", () => {
|
||||||
it("should return 10 when player level is 5 and delta is 5", () => {
|
it("should return 10 when player level is 5 and delta is 5", () => {
|
||||||
const levelDetails: MinMax = { min: 5, max: 10 };
|
const levelDetails: MinMax = { min: 5, max: 10 };
|
||||||
const botGenDetails: BotGenerationDetails = {
|
const botGenDetails: IBotGenerationDetails = {
|
||||||
isPmc: false,
|
isPmc: false,
|
||||||
role: "",
|
role: "",
|
||||||
side: "",
|
side: "",
|
||||||
@ -62,7 +62,7 @@ describe("BotLevelGenerator", () => {
|
|||||||
|
|
||||||
it("should return 79 when player level is above possible max (100), desired max is 100 and delta is 5", () => {
|
it("should return 79 when player level is above possible max (100), desired max is 100 and delta is 5", () => {
|
||||||
const levelDetails: MinMax = { min: 100, max: 100 };
|
const levelDetails: MinMax = { min: 100, max: 100 };
|
||||||
const botGenDetails: BotGenerationDetails = {
|
const botGenDetails: IBotGenerationDetails = {
|
||||||
isPmc: false,
|
isPmc: false,
|
||||||
role: "",
|
role: "",
|
||||||
side: "",
|
side: "",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user