import { BotInventoryGenerator } from "https://deno.land/x/sptaki@1.2.0/generators/mod.ts";
Constructors
new
BotInventoryGenerator(logger: ILogger,
hashUtil: HashUtil,
randomUtil: RandomUtil,
databaseServer: DatabaseServer,
botWeaponGenerator: BotWeaponGenerator,
botLootGenerator: BotLootGenerator,
botGeneratorHelper: BotGeneratorHelper,
botHelper: BotHelper,
weightedRandomHelper: WeightedRandomHelper,
itemHelper: ItemHelper,
localisationService: LocalisationService,
botEquipmentModPoolService: BotEquipmentModPoolService,
botEquipmentModGenerator: BotEquipmentModGenerator,
configServer: ConfigServer,
Properties
protected
botConfig: IBotConfigprotected
botEquipmentModGenerator: BotEquipmentModGeneratorprotected
botEquipmentModPoolService: BotEquipmentModPoolServiceprotected
botGeneratorHelper: BotGeneratorHelperprotected
botHelper: BotHelperprotected
botLootGenerator: BotLootGeneratorprotected
botWeaponGenerator: BotWeaponGeneratorprotected
configServer: ConfigServerprotected
databaseServer: DatabaseServerprotected
hashUtil: HashUtilprotected
itemHelper: ItemHelperprotected
localisationService: LocalisationServiceprotected
logger: ILoggerprotected
randomUtil: RandomUtilprotected
weightedRandomHelper: WeightedRandomHelperMethods
protected
addWeaponAndMagazinesToInventory(sessionId: string,
weaponSlot: { slot: EquipmentSlots; shouldSpawn: boolean; },
templateInventory: Inventory,
botInventory: PmcInventory,
equipmentChances: Chances,
botRole: string,
isPmc: boolean,
itemGenerationWeights: Generation,
botLevel: number,
Add weapon + spare mags/ammo to bots inventory
protected
filterRigsToThoseWithoutProtection(templateInventory: Inventory): voidRemove armored rigs from parameter data
protected
filterRigsToThoseWithProtection(templateInventory: Inventory): voidRemove non-armored rigs from parameter data
protected
generateAndAddEquipmentToBot(templateInventory: Inventory,
wornItemChances: Chances,
botRole: string,
botInventory: PmcInventory,
botLevel: number,
Add equipment to a bot
protected
generateAndAddWeaponsToBot(templateInventory: Inventory,
equipmentChances: Chances,
sessionId: string,
botInventory: PmcInventory,
botRole: string,
isPmc: boolean,
itemGenerationLimitsMinMax: Generation,
botLevel: number,
Work out what weapons bot should have equipped and add them to bot inventory
protected
generateEquipment(settings: IGenerateEquipmentProperties): booleanAdd a piece of equipment with mods to inventory from the provided pools
protected
generateInventoryBase(): PmcInventoryCreate a pmcInventory object with all the base/generic items needed
protected
getDesiredWeaponsForBot(equipmentChances: Chances): { slot: EquipmentSlots; shouldSpawn: boolean; }[]Calculate if the bot should have weapons in Primary/Secondary/Holster slots
protected
getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record<string, string[]>Get all possible mods for item and filter down based on equipment blacklist from bot.json config
Add equipment/weapons/loot to bot