import { BotGeneratorHelper } from "https://deno.land/x/sptaki@1.2.0/helpers/mod.ts";
Constructors
new
BotGeneratorHelper(logger: ILogger,
randomUtil: RandomUtil,
databaseServer: DatabaseServer,
durabilityLimitsHelper: DurabilityLimitsHelper,
itemHelper: ItemHelper,
inventoryHelper: InventoryHelper,
containerHelper: ContainerHelper,
applicationContext: ApplicationContext,
localisationService: LocalisationService,
configServer: ConfigServer,
Properties
protected
applicationContext: ApplicationContextprotected
botConfig: IBotConfigprotected
configServer: ConfigServerprotected
containerHelper: ContainerHelperprotected
databaseServer: DatabaseServerprotected
durabilityLimitsHelper: DurabilityLimitsHelperprotected
inventoryHelper: InventoryHelperprotected
itemHelper: ItemHelperprotected
localisationService: LocalisationServiceprotected
logger: ILoggerprotected
pmcConfig: IPmcConfigprotected
randomUtil: RandomUtilMethods
protected
generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): RepairableCreate a repairable object for an armor that containers durability + max durability properties
protected
generateWeaponRepairableProperties(itemTemplate: ITemplateItem, botRole: string): RepairableCreate a repairable object for a weapon that containers durability + max durability properties
protected
getBotEquipmentSettingFromConfig(): numberGet the chance for the weapon attachment or helmet equipment to be set as activated
protected
getRandomizedResourceValue(maxResource: number, randomizationValues: IRandomisedResourceValues): numberRandomize the HpResource for bots e.g (245/400 resources)
protected
itemAllowedInContainer(slotGrid: Grid, itemTpl: string): booleanIs the provided item allowed inside a container
addItemWithChildrenToEquipmentSlot(): ItemAddedResult
equipmentSlots: string[],
rootItemId: string,
rootItemTplId: string,
itemWithChildren: Item[],
inventory: Inventory,
containersIdFull?: Set<string>,
Adds an item with all its children into specified equipmentSlots, wherever it fits.
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { upd?: Upd; }
Adds properties to an item e.g. Repairable / HasHinge / Foldable / MaxDurability
getBotEquipmentRole(botRole: string): string
Convert a bots role to the equipment role used in config/bot.json
Can item be added to another item without conflict