Storage-strategy contract for [ItemContainer] (#147). Removes the slot/free-list fork from [ItemContainer]'s public method bodies. Concrete strategies ([FreeListStorage], [SlotStorage]) own their data and the validation/weight/capacity rules for their mode; [ItemContainer] delegates every public operation to the active strategy instead of branching on [method ItemContainer.is_slot_based].
Source: addons/item_vault/inventory/container_storage.gd
Syntax
class ContainerStorage extends RefCountedMembers
| Name | Kind | Summary |
|---|---|---|
type | Property | |
configure | Method | |
clear | Method | |
add | Method | |
remove | Method | |
extract_stacks | Method | |
extract_fragments | Method | |
count | Method | |
has_space | Method | |
can_accept | Method | |
weight | Method | |
all_items | Method | |
stacks | Method | |
slots | Method | |
stack_at | Method | |
slot_at | Method | |
add_at_slot | Method | |
to_dict | Method | |
load_from | Method |