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

Add child slot items to an item, chooses random child item if multiple choices exist

Parameters

itemToAdd: Item[]

array with single object (root item)

itemToAddTemplate: ITemplateItem

Db tempalte for root item

optional
modSpawnChanceDict: Record<string, number>

Optional dictionary of mod name + % chance mod will be included in item (e.g. front_plate: 100)

optional
requiredOnly: boolean

Only add required mods

Returns

Item with children