Skip to main content
The Deno 2 Release Candidate is here
Learn more
method InsuranceController.prototype.populateParentAttachmentsMap
import { InsuranceController } from "https://deno.land/x/sptaki@1.2.0/controllers/InsuranceController.d.ts";

Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, not the backpack that the gun is located in (the gun's parent).

Parameters

rootItemParentID: string
  • The ID that should be assigned to all "hideout"/root items.
insured: Insurance
  • The insurance object containing the items to evaluate.
itemsMap: Map<string, Item>
  • A Map object for quick item look-up by item ID.

Returns

Map<string, Item[]>

A Map object containing parent item IDs to arrays of their attachment items.