Inventory.empty

Checks whether or not the inventory is empty.

  1. bool empty [@property getter]
    class Inventory
    @property @safe
    bool
    empty
    ()
  2. bool empty [@property setter]

Return Value

Type: bool

true if the inventory is empty, false otherwise

Examples

if(inventory.empty) {
   inventory[5] = new Items.Beetroot();
   assert(!inventory.empty);
}

Meta