import { BotEquipmentModGenerator } from "https://deno.land/x/sptaki@1.2.0/generators/BotEquipmentModGenerator.d.ts";
Constructors
Properties
Methods
Find mod tpls of a provided type and add to modPool
Set mod spawn chances to defined amount
Create a mod item with parameters as properties
With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots. This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine"
Filter a bots plate pool based on its current level
Filter out non-whitelisted weapon scopes Controlled by bot.json weaponSightWhitelist e.g. filter out rifle scopes from SMGs
Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist
Get a list of containers that hold ammo e.g. mod_magazine / patron_in_weapon_000
Get the possible items that fit a slot
Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl)
Get a Slot property for an item (chamber/cartridge/slot)
Filter mod pool down based on various criteria: Is slot flagged as randomisable Is slot required Is slot flagged as default mod only
Get a random mod from an items compatible mods Filter array
Check if mod exists in db + is for a required slot
Take a record of camoras and merge the compatible shells into one array
Is this modslot a front or rear sight
Does the provided mod details show the mod can hold a scope
Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot
Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible
Check mods are compatible and add to array
Add mods to a weapon using the provided mod pool