Slot.empty

Checks whether or not the slot is empty. A slot is considered empty when its count is equal to 0 or when its item is null.

struct Slot
pure nothrow @property @safe @nogc
bool
empty
()

Examples

Slot slot = Slot(null);
assert(slot.empty);

slot = Slot(new Items.Snowball(), 1);
assert(!slot.empty);

slot.count--;
assert(slot.empty);

Meta