Source: addons/item_vault/pickups/pickup_contents.gd
Syntax
class PickupContents extends ResourceMembers
| Name | Kind | Summary |
|---|---|---|
item | Property | First-class authoring contract for a preplaced pickup's item payload. A designer places a Pickup2D/3D in a level and assigns this resource to configure what the pickup grants on collection. This is the static authoring counterpart to runtime payload injection via WorldItemStackMeta: a spawner that writes metadata at runtime takes precedence (see PickupRuntime.get_pickup_stack precedence order). Configuration vs live state: PickupContents holds immutable authoring data (an ItemDefinition reference + a quantity). It does NOT hold a live ItemStack. create_stack() constructs a fresh ItemStack on each take() so a shared .tres resource cannot leak runtime mutations (quantity changes, overflow writebacks) between pickup instances that reference it. The item this pickup grants. Required. |
quantity | Property | How many of the item to grant on pickup. |
create_stack | Method | |
is_configured | Method |