Skip to content
ct

Class

PickupContents

Generated GDScript class reference for ItemVault.PickupContents.

Status
Draft
Version
v1.0
Updated
Development docs generated from GDScript source

This is unreleased documentation in active development. APIs, class names, and behavior may change before the final release.

Source: addons/item_vault/pickups/pickup_contents.gd

Syntax

class PickupContents extends Resource

Members

NameKindSummary
itemPropertyFirst-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.
quantityPropertyHow many of the item to grant on pickup.
create_stackMethod
is_configuredMethod