Namespace: GGG.Inventory

Runtime state for one stable inventory position.

public sealed class InventorySlot

Inheritance

object ← InventorySlot

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Properties

Index

Gets the zero-based index of this slot.

public int Index { get; }

Property Value

int

IsEmpty

Gets whether the slot or stack contains no items.

public bool IsEmpty { get; }

Property Value

bool

Quantity

Gets the number of runtime items in this stack or slot.

public int Quantity { get; }

Property Value

int

Stack

Gets the item stack assigned to this slot, if any.

public InventoryStack Stack { get; }

Property Value

InventoryStack

Methods

ToString()

Returns a readable representation of this instance.

public override string ToString()

Returns

string

A readable representation of this instance.