Inventory.this

Constructs an inventory giving an array of slots. The length of the inventory will be the same as the given array.

  1. this(size_t size)
  2. this(Slot[] slots)
    class Inventory
    @safe
    this
  3. this(Inventory inventory)

Parameters

slots Slot[]

one or more slots

Examples

auto a = new Inventory(Slot(null));
auto b = new Inventory(Slot(null), Slot(null));
auto c = new Inventory([Slot(null), Slot(null)]);

Meta