Skip to content

Class

InventoryTarget

Generated GDScript class reference for ItemVault.InventoryTarget.

Status
Current
Version
v1.1
Source updated
2026-09-12
Generated on
2026-10-12

Documented contract for an object that accepts ItemStack adds: the target type consumed by InventoryPickupBridge. A CONTRACT, not a base class. Inventory and ItemContainer satisfy it by duck-typing. The static helpers below validate it, so misconfiguration fails loudly in the bridge's target setter rather than silently at pickup time. To support a new target type, expose:

  • func add(stack: ItemStack) -> ItemStack (required)
  • var wallet: Wallet (optional; enables currency routing) A base class was rejected: the two implementers have separate inheritance chains, so sharing one is an invasive change for a one-method contract.

Source: addons/item_vault/bridge/inventory_target.gd

Syntax

class InventoryTarget extends RefCounted

Members

NameKindSummary
is_valid_targetMethod
get_walletMethod
validate_or_warnMethod