Skip to main content
The Deno 2 Release Candidate is here
Learn more
method ItemHelper.prototype.drawAmmoTpl
Re-export
import { ItemHelper } from "https://deno.land/x/sptaki@1.2.0/helpers/mod.ts";

Chose a randomly weighted cartridge that fits

Parameters

caliber: string

Desired caliber

staticAmmoDist: Record<string, IStaticAmmoDetails[]>

Cartridges and thier weights

fallbackCartridgeTpl: string

If a cartridge cannot be found in the above staticAmmoDist param, use this instead

optional
cartridgeWhitelist: string[]

OPTIONAL whitelist for cartridges

Returns

string

Tpl of cartridge