Inventory

Fixed-size, index-based item storage. An Inventory contains a configurable number of InventorySlot instances, each tracking an ItemID and quantity. Provides event-driven change notifications for HUD synchronization.

Architecture

spinner

Data Flow

spinner

Key Concepts

Concept
Description

Fixed size

Slot count is set via Inspector (size field) and allocated at Initialize()

ID-based storage

Slots store ItemID (type + variant), not Item references

Event-driven

OnInventoryChanged fires on SetSlot() / ClearSlot() for HUD sync

No stacking logic

Inventory is a raw container — stacking, validation, and max-stack are handled elsewhere

IEnumerable

Can be iterated with foreach or LINQ

Classes

Class
Description

Fixed-size slot container with change events

Individual slot storing an ItemID and quantity

See Also

  • Item — the item system whose IDs are stored in slots

  • Hotbar — HUD subsystem that displays inventory contents

  • ParagonObject — base class providing lifecycle

Last updated