class InventoryEquipmentSlot extends OffhandEquipmentSlot
A slot-like interface for a specific grid position in an inventory.
The size is typically bound to anything that can be stowed which encompasses most all Equipment
.
The capacity of this EquipmentSlot
is essentially treated as 1x1.
Upon insertions, however, the capacity temporarily is treated as the size of the item being inserted (unless None
).
This allows a proper check for insertion collision.
Rather than operating on a fixed-size slot, this "slot" represents an inventory region that either includes slot
or starts at slot
.
When determining the contents of the inventory at slot
, only that singular cell is checked.
When removing an item from slot
, the item in inventory only has to be positioned in such a way that overlaps with slot
.
When adding an item to slot
, slot
is treated as the upper left corner (the initial point) of a larger capacity region.
The following diagrams demonstrate the coordinate association:
- - - - - - - - - - - - - - -
- - - - - - r r x - - - - - -
- - s - - - r r x - - - i i -
- - - - - - x x x - - - i i -
- - - - - - - - - - - - - - -
... where 's' is the 1x1 slot,
'r' is the corner of any 2x2 item that can be removed ('x' is a potential affected edge),
and 'i' is the region checked for a 2x2 insertion into slot
.
- Alphabetic
- By Inheritance
- InventoryEquipmentSlot
- OffhandEquipmentSlot
- EquipmentSlot
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new InventoryEquipmentSlot(slot: Int, inv: GridInventory)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def Equipment: Option[Equipment]
Determine what
Equipment
is stowed in the given position.Determine what
Equipment
is stowed in the given position.- returns
the
Equipment
in this slot
- Definition Classes
- InventoryEquipmentSlot → EquipmentSlot
- def Equipment_=(assignEquipment: Option[Equipment]): Option[Equipment]
Attempt to stow an item at the given position.
Attempt to stow an item at the given position.
- assignEquipment
the change in
Equipment
for this slot- returns
the
Equipment
in this slot
- Definition Classes
- InventoryEquipmentSlot → EquipmentSlot
- def Equipment_=(assignEquipment: Equipment): Option[Equipment]
Attempt to stow an item at the given position.
Attempt to stow an item at the given position.
- assignEquipment
the change in
Equipment
for this slot- returns
the
Equipment
in this slot
- Definition Classes
- EquipmentSlot
- def Size: equipment.EquipmentSize.Value
- Definition Classes
- EquipmentSlot
- def Size_=(assignSize: equipment.EquipmentSize.Value): equipment.EquipmentSize.Value
Not allowed to change the slot size manually.
Not allowed to change the slot size manually.
- assignSize
the changed in capacity for this slot
- returns
the capacity for this slot
- Definition Classes
- OffhandEquipmentSlot → EquipmentSlot
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()