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