Container

interface Container

Minimal container/inventory abstraction.

Design note

KTale doesn't assume a particular slot model (grid vs list vs equipment). This is a generic interface that can represent backpacks, equipment, bags, etc. through ContainerKind and slot indexing.

Properties

Link copied to clipboard
abstract val id: Key

Stable identifier for this container (best-effort).

Link copied to clipboard
abstract val kind: ContainerKind

Kind identifier (e.g. "equipment", "backpack", "brewery_bag").

Functions

Link copied to clipboard
abstract fun get(slot: Int): ItemStack?
Link copied to clipboard
abstract fun set(slot: Int, stack: ItemStack?)
Link copied to clipboard
abstract fun size(): Int

Number of slots in this container.