Update types for examples 1/2/3

This commit is contained in:
Chomp 2022-08-28 13:46:34 +01:00
parent bf8eaf92ad
commit 8537eba180
15 changed files with 282 additions and 222 deletions

View File

@ -22,12 +22,14 @@ import { ProfileHelper } from "./ProfileHelper";
import { RagfairHelper } from "./RagfairHelper";
import { RagfairServerHelper } from "./RagfairServerHelper";
import { RagfairSortHelper } from "./RagfairSortHelper";
import { TraderHelper } from "./TraderHelper";
export declare class RagfairOfferHelper {
protected logger: ILogger;
protected timeUtil: TimeUtil;
protected hashUtil: HashUtil;
protected itemEventRouter: ItemEventRouter;
protected databaseServer: DatabaseServer;
protected traderHelper: TraderHelper;
protected saveServer: SaveServer;
protected dialogueHelper: DialogueHelper;
protected itemHelper: ItemHelper;
@ -43,7 +45,7 @@ export declare class RagfairOfferHelper {
protected static goodSoldTemplate: string;
protected ragfairConfig: IRagfairConfig;
protected questConfig: IQuestConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer);
constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer);
getValidOffers(info: ISearchRequestData, itemsToAdd: string[], assorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
getOffersForBuild(info: ISearchRequestData, itemsToAdd: string[], assorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
processOffersOnProfile(sessionID: string): boolean;

View File

@ -1,17 +1,31 @@
import { MinMax } from "../../common/MinMax";
import { IBaseConfig } from "./IBaseConfig";
import { IBotDurability } from "./IBotDurability";
import { IPmcConfig } from "./IPmcConfig";
export interface IBotConfig extends IBaseConfig {
kind: "aki-bot";
/** How many variants of each bot should be generated on raid start */
presetBatch: PresetBatch;
/** What bot types should be classified as bosses */
bosses: string[];
durability: Durability;
/** Control weapon/armor durability min/max values for each bot type */
durability: IBotDurability;
/** Control the weighting of how expensive an average loot item is on a PMC or Scav */
lootNValue: LootNvalue;
/** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */
revenge: Record<string, string[]>;
pmc: PmcConfig;
/** PMC bot specific config settings */
pmc: IPmcConfig;
/** Control how many items are allowed to spawn on a bot
* key: bottype, value: <key: itemTpl: value: max item count> */
itemSpawnLimits: Record<string, Record<string, number>>;
equipment: Record<string, Equipment>;
/** Blacklist/whitelist items on a bot */
equipment: Record<string, EquipmentFilters>;
/** Show a bots botType value after their name */
showTypeInNickname: boolean;
/** Max number of bots that can be spawned in a raid at any one time */
maxBotCap: number;
/** How many stacks of secret ammo should a bot have in its bot secure container */
secureContainerAmmoStackCount: number;
}
export interface PresetBatch {
@ -44,85 +58,20 @@ export interface PresetBatch {
test: number;
exUsec: number;
}
export interface Durability {
default: DefaultDurability;
pmc: PmcDurability;
boss: BotDurability;
follower: BotDurability;
assault: BotDurability;
cursedassault: BotDurability;
marksman: BotDurability;
pmcbot: BotDurability;
exusec: BotDurability;
sectantpriest: BotDurability;
sectantwarrior: BotDurability;
}
export interface DefaultDurability {
armor: DefaultArmor;
weapon: WeaponDurability;
}
export interface DefaultArmor {
maxDelta: number;
minDelta: number;
}
export interface WeaponDurability {
lowestMax: number;
highestMax: number;
maxDelta: number;
minDelta: number;
}
export interface PmcDurability {
armor: PmcDurabilityArmor;
weapon: WeaponDurability;
}
export interface PmcDurabilityArmor {
lowestMaxPercent: number;
highestMaxPercent: number;
maxDelta: number;
minDelta: number;
}
export interface BotDurability {
armor: ArmorDurability;
weapon: WeaponDurability;
}
export interface ArmorDurability {
maxDelta: number;
minDelta: number;
}
export interface LootNvalue {
scav: number;
pmc: number;
}
export interface PmcConfig {
dynamicLoot: PmcDynamicLoot;
useDifficultyOverride: boolean;
difficulty: string;
looseWeaponInBackpackChancePercent: number;
looseWeaponInBackpackLootMinMax: MinMax;
isUsec: number;
chanceSameSideIsHostilePercent: number;
usecType: string;
bearType: string;
maxBackpackLootTotalRub: number;
maxPocketLootTotalRub: number;
maxVestLootTotalRub: number;
convertIntoPmcChance: Record<string, MinMax>;
enemyTypes: string[];
}
export interface PmcDynamicLoot {
whitelist: string[];
blacklist: string[];
moneyStackLimits: Record<string, number>;
}
export interface Equipment {
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
export interface EquipmentFilters {
weaponModLimits: ModLimits;
randomisedWeaponModSlots?: string[];
blacklist: EquipmentFilterDetails[];
whitelist: EquipmentFilterDetails[];
}
export interface ModLimits {
/** 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 EquipmentFilterDetails {

View File

@ -0,0 +1,47 @@
export interface IBotDurability {
default: DefaultDurability;
pmc: PmcDurability;
boss: BotDurability;
follower: BotDurability;
assault: BotDurability;
cursedassault: BotDurability;
marksman: BotDurability;
pmcbot: BotDurability;
exusec: BotDurability;
gifter: BotDurability;
sectantpriest: BotDurability;
sectantwarrior: BotDurability;
}
/** Durability values to be used when a more specific bot type cant be found */
export interface DefaultDurability {
armor: DefaultArmor;
weapon: WeaponDurability;
}
export interface DefaultArmor {
maxDelta: number;
minDelta: number;
}
export interface WeaponDurability {
lowestMax: number;
highestMax: number;
maxDelta: number;
minDelta: number;
}
export interface PmcDurability {
armor: PmcDurabilityArmor;
weapon: WeaponDurability;
}
export interface PmcDurabilityArmor {
lowestMaxPercent: number;
highestMaxPercent: number;
maxDelta: number;
minDelta: number;
}
export interface BotDurability {
armor: ArmorDurability;
weapon: WeaponDurability;
}
export interface ArmorDurability {
maxDelta: number;
minDelta: number;
}

View File

@ -0,0 +1,22 @@
import { MinMax } from "../../common/MinMax";
export interface IPmcConfig {
dynamicLoot: DynamicLoot;
useDifficultyOverride: boolean;
difficulty: string;
looseWeaponInBackpackChancePercent: number;
looseWeaponInBackpackLootMinMax: MinMax;
isUsec: number;
chanceSameSideIsHostilePercent: number;
usecType: string;
bearType: string;
maxBackpackLootTotalRub: number;
maxPocketLootTotalRub: number;
maxVestLootTotalRub: number;
convertIntoPmcChance: Record<string, MinMax>;
enemyTypes: string[];
}
export interface DynamicLoot {
whitelist: string[];
blacklist: string[];
moneyStackLimits: Record<string, number>;
}

View File

@ -1,12 +1,12 @@
import { IBotType } from "../models/eft/common/tables/IBotType";
import { Equipment, EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
import { EquipmentFilters, EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
export declare class BotEquipmentFilterService {
protected logger: ILogger;
protected configServer: ConfigServer;
protected botConfig: IBotConfig;
protected botEquipmentFilterlists: Record<string, Equipment>;
protected botEquipmentFilterlists: Record<string, EquipmentFilters>;
constructor(logger: ILogger, configServer: ConfigServer);
/**
* Filter a bots data to exclude equipment and cartridges defines in the botConfig

View File

@ -22,12 +22,14 @@ import { ProfileHelper } from "./ProfileHelper";
import { RagfairHelper } from "./RagfairHelper";
import { RagfairServerHelper } from "./RagfairServerHelper";
import { RagfairSortHelper } from "./RagfairSortHelper";
import { TraderHelper } from "./TraderHelper";
export declare class RagfairOfferHelper {
protected logger: ILogger;
protected timeUtil: TimeUtil;
protected hashUtil: HashUtil;
protected itemEventRouter: ItemEventRouter;
protected databaseServer: DatabaseServer;
protected traderHelper: TraderHelper;
protected saveServer: SaveServer;
protected dialogueHelper: DialogueHelper;
protected itemHelper: ItemHelper;
@ -43,7 +45,7 @@ export declare class RagfairOfferHelper {
protected static goodSoldTemplate: string;
protected ragfairConfig: IRagfairConfig;
protected questConfig: IQuestConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer);
constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer);
getValidOffers(info: ISearchRequestData, itemsToAdd: string[], assorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
getOffersForBuild(info: ISearchRequestData, itemsToAdd: string[], assorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
processOffersOnProfile(sessionID: string): boolean;

View File

@ -1,17 +1,31 @@
import { MinMax } from "../../common/MinMax";
import { IBaseConfig } from "./IBaseConfig";
import { IBotDurability } from "./IBotDurability";
import { IPmcConfig } from "./IPmcConfig";
export interface IBotConfig extends IBaseConfig {
kind: "aki-bot";
/** How many variants of each bot should be generated on raid start */
presetBatch: PresetBatch;
/** What bot types should be classified as bosses */
bosses: string[];
durability: Durability;
/** Control weapon/armor durability min/max values for each bot type */
durability: IBotDurability;
/** Control the weighting of how expensive an average loot item is on a PMC or Scav */
lootNValue: LootNvalue;
/** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */
revenge: Record<string, string[]>;
pmc: PmcConfig;
/** PMC bot specific config settings */
pmc: IPmcConfig;
/** Control how many items are allowed to spawn on a bot
* key: bottype, value: <key: itemTpl: value: max item count> */
itemSpawnLimits: Record<string, Record<string, number>>;
equipment: Record<string, Equipment>;
/** Blacklist/whitelist items on a bot */
equipment: Record<string, EquipmentFilters>;
/** Show a bots botType value after their name */
showTypeInNickname: boolean;
/** Max number of bots that can be spawned in a raid at any one time */
maxBotCap: number;
/** How many stacks of secret ammo should a bot have in its bot secure container */
secureContainerAmmoStackCount: number;
}
export interface PresetBatch {
@ -44,85 +58,20 @@ export interface PresetBatch {
test: number;
exUsec: number;
}
export interface Durability {
default: DefaultDurability;
pmc: PmcDurability;
boss: BotDurability;
follower: BotDurability;
assault: BotDurability;
cursedassault: BotDurability;
marksman: BotDurability;
pmcbot: BotDurability;
exusec: BotDurability;
sectantpriest: BotDurability;
sectantwarrior: BotDurability;
}
export interface DefaultDurability {
armor: DefaultArmor;
weapon: WeaponDurability;
}
export interface DefaultArmor {
maxDelta: number;
minDelta: number;
}
export interface WeaponDurability {
lowestMax: number;
highestMax: number;
maxDelta: number;
minDelta: number;
}
export interface PmcDurability {
armor: PmcDurabilityArmor;
weapon: WeaponDurability;
}
export interface PmcDurabilityArmor {
lowestMaxPercent: number;
highestMaxPercent: number;
maxDelta: number;
minDelta: number;
}
export interface BotDurability {
armor: ArmorDurability;
weapon: WeaponDurability;
}
export interface ArmorDurability {
maxDelta: number;
minDelta: number;
}
export interface LootNvalue {
scav: number;
pmc: number;
}
export interface PmcConfig {
dynamicLoot: PmcDynamicLoot;
useDifficultyOverride: boolean;
difficulty: string;
looseWeaponInBackpackChancePercent: number;
looseWeaponInBackpackLootMinMax: MinMax;
isUsec: number;
chanceSameSideIsHostilePercent: number;
usecType: string;
bearType: string;
maxBackpackLootTotalRub: number;
maxPocketLootTotalRub: number;
maxVestLootTotalRub: number;
convertIntoPmcChance: Record<string, MinMax>;
enemyTypes: string[];
}
export interface PmcDynamicLoot {
whitelist: string[];
blacklist: string[];
moneyStackLimits: Record<string, number>;
}
export interface Equipment {
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
export interface EquipmentFilters {
weaponModLimits: ModLimits;
randomisedWeaponModSlots?: string[];
blacklist: EquipmentFilterDetails[];
whitelist: EquipmentFilterDetails[];
}
export interface ModLimits {
/** 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 EquipmentFilterDetails {

View File

@ -0,0 +1,47 @@
export interface IBotDurability {
default: DefaultDurability;
pmc: PmcDurability;
boss: BotDurability;
follower: BotDurability;
assault: BotDurability;
cursedassault: BotDurability;
marksman: BotDurability;
pmcbot: BotDurability;
exusec: BotDurability;
gifter: BotDurability;
sectantpriest: BotDurability;
sectantwarrior: BotDurability;
}
/** Durability values to be used when a more specific bot type cant be found */
export interface DefaultDurability {
armor: DefaultArmor;
weapon: WeaponDurability;
}
export interface DefaultArmor {
maxDelta: number;
minDelta: number;
}
export interface WeaponDurability {
lowestMax: number;
highestMax: number;
maxDelta: number;
minDelta: number;
}
export interface PmcDurability {
armor: PmcDurabilityArmor;
weapon: WeaponDurability;
}
export interface PmcDurabilityArmor {
lowestMaxPercent: number;
highestMaxPercent: number;
maxDelta: number;
minDelta: number;
}
export interface BotDurability {
armor: ArmorDurability;
weapon: WeaponDurability;
}
export interface ArmorDurability {
maxDelta: number;
minDelta: number;
}

View File

@ -0,0 +1,22 @@
import { MinMax } from "../../common/MinMax";
export interface IPmcConfig {
dynamicLoot: DynamicLoot;
useDifficultyOverride: boolean;
difficulty: string;
looseWeaponInBackpackChancePercent: number;
looseWeaponInBackpackLootMinMax: MinMax;
isUsec: number;
chanceSameSideIsHostilePercent: number;
usecType: string;
bearType: string;
maxBackpackLootTotalRub: number;
maxPocketLootTotalRub: number;
maxVestLootTotalRub: number;
convertIntoPmcChance: Record<string, MinMax>;
enemyTypes: string[];
}
export interface DynamicLoot {
whitelist: string[];
blacklist: string[];
moneyStackLimits: Record<string, number>;
}

View File

@ -1,12 +1,12 @@
import { IBotType } from "../models/eft/common/tables/IBotType";
import { Equipment, EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
import { EquipmentFilters, EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
export declare class BotEquipmentFilterService {
protected logger: ILogger;
protected configServer: ConfigServer;
protected botConfig: IBotConfig;
protected botEquipmentFilterlists: Record<string, Equipment>;
protected botEquipmentFilterlists: Record<string, EquipmentFilters>;
constructor(logger: ILogger, configServer: ConfigServer);
/**
* Filter a bots data to exclude equipment and cartridges defines in the botConfig

View File

@ -22,12 +22,14 @@ import { ProfileHelper } from "./ProfileHelper";
import { RagfairHelper } from "./RagfairHelper";
import { RagfairServerHelper } from "./RagfairServerHelper";
import { RagfairSortHelper } from "./RagfairSortHelper";
import { TraderHelper } from "./TraderHelper";
export declare class RagfairOfferHelper {
protected logger: ILogger;
protected timeUtil: TimeUtil;
protected hashUtil: HashUtil;
protected itemEventRouter: ItemEventRouter;
protected databaseServer: DatabaseServer;
protected traderHelper: TraderHelper;
protected saveServer: SaveServer;
protected dialogueHelper: DialogueHelper;
protected itemHelper: ItemHelper;
@ -43,7 +45,7 @@ export declare class RagfairOfferHelper {
protected static goodSoldTemplate: string;
protected ragfairConfig: IRagfairConfig;
protected questConfig: IQuestConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer);
constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer);
getValidOffers(info: ISearchRequestData, itemsToAdd: string[], assorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
getOffersForBuild(info: ISearchRequestData, itemsToAdd: string[], assorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
processOffersOnProfile(sessionID: string): boolean;

View File

@ -1,17 +1,31 @@
import { MinMax } from "../../common/MinMax";
import { IBaseConfig } from "./IBaseConfig";
import { IBotDurability } from "./IBotDurability";
import { IPmcConfig } from "./IPmcConfig";
export interface IBotConfig extends IBaseConfig {
kind: "aki-bot";
/** How many variants of each bot should be generated on raid start */
presetBatch: PresetBatch;
/** What bot types should be classified as bosses */
bosses: string[];
durability: Durability;
/** Control weapon/armor durability min/max values for each bot type */
durability: IBotDurability;
/** Control the weighting of how expensive an average loot item is on a PMC or Scav */
lootNValue: LootNvalue;
/** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */
revenge: Record<string, string[]>;
pmc: PmcConfig;
/** PMC bot specific config settings */
pmc: IPmcConfig;
/** Control how many items are allowed to spawn on a bot
* key: bottype, value: <key: itemTpl: value: max item count> */
itemSpawnLimits: Record<string, Record<string, number>>;
equipment: Record<string, Equipment>;
/** Blacklist/whitelist items on a bot */
equipment: Record<string, EquipmentFilters>;
/** Show a bots botType value after their name */
showTypeInNickname: boolean;
/** Max number of bots that can be spawned in a raid at any one time */
maxBotCap: number;
/** How many stacks of secret ammo should a bot have in its bot secure container */
secureContainerAmmoStackCount: number;
}
export interface PresetBatch {
@ -44,85 +58,20 @@ export interface PresetBatch {
test: number;
exUsec: number;
}
export interface Durability {
default: DefaultDurability;
pmc: PmcDurability;
boss: BotDurability;
follower: BotDurability;
assault: BotDurability;
cursedassault: BotDurability;
marksman: BotDurability;
pmcbot: BotDurability;
exusec: BotDurability;
sectantpriest: BotDurability;
sectantwarrior: BotDurability;
}
export interface DefaultDurability {
armor: DefaultArmor;
weapon: WeaponDurability;
}
export interface DefaultArmor {
maxDelta: number;
minDelta: number;
}
export interface WeaponDurability {
lowestMax: number;
highestMax: number;
maxDelta: number;
minDelta: number;
}
export interface PmcDurability {
armor: PmcDurabilityArmor;
weapon: WeaponDurability;
}
export interface PmcDurabilityArmor {
lowestMaxPercent: number;
highestMaxPercent: number;
maxDelta: number;
minDelta: number;
}
export interface BotDurability {
armor: ArmorDurability;
weapon: WeaponDurability;
}
export interface ArmorDurability {
maxDelta: number;
minDelta: number;
}
export interface LootNvalue {
scav: number;
pmc: number;
}
export interface PmcConfig {
dynamicLoot: PmcDynamicLoot;
useDifficultyOverride: boolean;
difficulty: string;
looseWeaponInBackpackChancePercent: number;
looseWeaponInBackpackLootMinMax: MinMax;
isUsec: number;
chanceSameSideIsHostilePercent: number;
usecType: string;
bearType: string;
maxBackpackLootTotalRub: number;
maxPocketLootTotalRub: number;
maxVestLootTotalRub: number;
convertIntoPmcChance: Record<string, MinMax>;
enemyTypes: string[];
}
export interface PmcDynamicLoot {
whitelist: string[];
blacklist: string[];
moneyStackLimits: Record<string, number>;
}
export interface Equipment {
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
export interface EquipmentFilters {
weaponModLimits: ModLimits;
randomisedWeaponModSlots?: string[];
blacklist: EquipmentFilterDetails[];
whitelist: EquipmentFilterDetails[];
}
export interface ModLimits {
/** 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 EquipmentFilterDetails {

View File

@ -0,0 +1,47 @@
export interface IBotDurability {
default: DefaultDurability;
pmc: PmcDurability;
boss: BotDurability;
follower: BotDurability;
assault: BotDurability;
cursedassault: BotDurability;
marksman: BotDurability;
pmcbot: BotDurability;
exusec: BotDurability;
gifter: BotDurability;
sectantpriest: BotDurability;
sectantwarrior: BotDurability;
}
/** Durability values to be used when a more specific bot type cant be found */
export interface DefaultDurability {
armor: DefaultArmor;
weapon: WeaponDurability;
}
export interface DefaultArmor {
maxDelta: number;
minDelta: number;
}
export interface WeaponDurability {
lowestMax: number;
highestMax: number;
maxDelta: number;
minDelta: number;
}
export interface PmcDurability {
armor: PmcDurabilityArmor;
weapon: WeaponDurability;
}
export interface PmcDurabilityArmor {
lowestMaxPercent: number;
highestMaxPercent: number;
maxDelta: number;
minDelta: number;
}
export interface BotDurability {
armor: ArmorDurability;
weapon: WeaponDurability;
}
export interface ArmorDurability {
maxDelta: number;
minDelta: number;
}

View File

@ -0,0 +1,22 @@
import { MinMax } from "../../common/MinMax";
export interface IPmcConfig {
dynamicLoot: DynamicLoot;
useDifficultyOverride: boolean;
difficulty: string;
looseWeaponInBackpackChancePercent: number;
looseWeaponInBackpackLootMinMax: MinMax;
isUsec: number;
chanceSameSideIsHostilePercent: number;
usecType: string;
bearType: string;
maxBackpackLootTotalRub: number;
maxPocketLootTotalRub: number;
maxVestLootTotalRub: number;
convertIntoPmcChance: Record<string, MinMax>;
enemyTypes: string[];
}
export interface DynamicLoot {
whitelist: string[];
blacklist: string[];
moneyStackLimits: Record<string, number>;
}

View File

@ -1,12 +1,12 @@
import { IBotType } from "../models/eft/common/tables/IBotType";
import { Equipment, EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
import { EquipmentFilters, EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
export declare class BotEquipmentFilterService {
protected logger: ILogger;
protected configServer: ConfigServer;
protected botConfig: IBotConfig;
protected botEquipmentFilterlists: Record<string, Equipment>;
protected botEquipmentFilterlists: Record<string, EquipmentFilters>;
constructor(logger: ILogger, configServer: ConfigServer);
/**
* Filter a bots data to exclude equipment and cartridges defines in the botConfig