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

Find a free location inside a container to fit the item

Parameters

containerFS2D: number[][]

Container grid to add item to

itemWithChildren: Item[]

Item to add to grid

containerId: string

Id of the container we're fitting item into

optional
desiredSlotId: string

slot id value to use, default is "hideout"