Class GGInventoryItemFilterStrategy extends Resource

The item filter strategy determines whether the inventory accepts a particular [GGItemData].

The default strategy accepts all items. Overriding accepts_item(), lets you define which items can be added to the inventory. For even more specificity, slot_accepts_item() indicates whether a specific inventory slot accepts a particular item. In addition, the find_free_slot_for_item() method is used to find a free slot for an item.

# Methods

## Returns a [code]slot_id[/code] where the [param item] can be stored in the [param inventory], or [code]-1[/code], if no slot is available. It takes the [method accepts_item] filter into account.
func find_free_slot_for_item(inventory: GGInventoryitem: GGItemDataoffset: int) -> int
## Returns whether the specified [param item] is allowed to be stored in the [param inventory].
func accepts_item(inventory: GGInventoryitem: GGItemData) -> bool
## Returns whether the specified [param item] is allowed to be stored in the [param inventory] in [param slot_id].
func slot_accepts_item(inventory: GGInventoryitem: GGItemDataslot_id: int) -> bool