Skip to content
ct

Class

PickupContents

Generated GDScript class reference for ItemVault.PickupContents.

Status
Current
Version
v1.0
Updated
2026-07-31

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.

Source: addons/item_vault/pickups/pickup_contents.gd

Syntax

class PickupContents extends Resource

Members

NameKindSummary
itemPropertyThe item this pickup grants. Required.
quantityPropertyHow many of the item to grant on pickup.
create_stackMethod
is_configuredMethod