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

meetsRequirements #

abstract fun meetsRequirements(craftingEntry: CraftingEntryWrapper, destroyedInstancedItems: List<InstancedItem>, inventoryData: InventoryData, ext: ExtCraftRequest): PragmaResult<Unit, List<String>>

Returns errors if a crafting entry cannot be crafted.

Used by:

  • InventoryService.craftV1

Return #

Craft result containing all inventory transformations to apply.

Parameters #

craftingEntry

The crafting entry being checked.

destroyedInstancedItems

The list of instance items that would be destroyed if the craft were performed.

inventoryData

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

ext

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