game-common / pragma.inventory / CraftingPlugin / craft /

craft #

abstract fun craft(craftingEntry: CraftingEntryWrapper, destroyedInstancedItems: List<InstancedItem>, playerInventory: InventoryData, inventoryContent: InventoryServiceContent, requestExt: ExtCraftRequest): InventoryModifications

Allows for performing arbitrary inventory transformations.

Used by:

  • InventoryService.craftV1
  • InventoryService.craftPartnerV1

Return #

Craft result containing all inventory transformations to apply.

Parameters #

craftingEntry

The crafting entry being invoked.

destroyedInstancedItems

The list of instance items to be destroyed in the craft operation, before they are destroyed.

playerInventory

The player’s inventory data, used to decide to perform the craft operation.

inventoryContent

A full reference to all inventory content, for reference purposes.

requestExt

A customer-defined proto containing details about the current craft operation.