A mutable stack of a single item type. Holds a reference to its ItemDefinition plus a quantity, with optional per-instance overrides.
Source: addons/item_vault/items/item_stack.gd
Syntax
class ItemStack extends RefCountedMembers
| Name | Kind | Summary |
|---|---|---|
item | Property | The item type this stack represents. |
quantity | Property | Current quantity in this stack. |
instance_id | Property | --- Optional instance overrides (0 / empty = use definition default) --- Unique identity for this particular stack instance (e.g. for save/load tracing). |
stack_id | Property | Stable identity for the concrete stack boundary. This is intentionally separate from [member instance_id]: one retained item instance can move through a stack, while stack_id identifies the storage boundary itself. |
max_override | Property | Override for max_stack on this specific stack. 0 = use item.max_stack. |
weight_override | Property | Override for weight on this specific stack. 0 = use item.weight. |
resources | Property | Retained numeric resources attached to this item instance (charges, durability, fuel, water, energy, or another game-defined quantity). |
effective_max | Method | |
effective_weight | Method | |
is_full | Method | |
space | Method | |
copy_with_quantity | Method | |
has_resource | Method | |
resource_amount | Method | |
set_resource | Method | |
to_dict | Method | |
from_dict | Method |