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 RefCountedMembers
| Name | Kind | Summary |
|---|---|---|
is_valid_target | Method | |
get_wallet | Method | |
validate_or_warn | Method |