Class

net.psforever.objects.inventory

InventoryEquipmentSlot

Related Doc: package inventory

Permalink

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.

Source
InventoryEquipmentSlot.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. InventoryEquipmentSlot
  2. OffhandEquipmentSlot
  3. EquipmentSlot
  4. AnyRef
  5. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new InventoryEquipmentSlot(slot: Int, inv: GridInventory)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from InventoryEquipmentSlot to any2stringadd[InventoryEquipmentSlot] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (InventoryEquipmentSlot, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from InventoryEquipmentSlot to ArrowAssoc[InventoryEquipmentSlot] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. def Equipment: Option[Equipment]

    Permalink

    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
    InventoryEquipmentSlotEquipmentSlot
  7. def Equipment_=(assignEquipment: Option[Equipment]): Option[Equipment]

    Permalink

    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
    InventoryEquipmentSlotEquipmentSlot
  8. def Equipment_=(assignEquipment: Equipment): Option[Equipment]

    Permalink

    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
  9. def Size: equipment.EquipmentSize.Value

    Permalink
    Definition Classes
    EquipmentSlot
  10. def Size_=(assignSize: equipment.EquipmentSize.Value): equipment.EquipmentSize.Value

    Permalink

    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
    OffhandEquipmentSlotEquipmentSlot
  11. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  12. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. def ensuring(cond: (InventoryEquipmentSlot) ⇒ Boolean, msg: ⇒ Any): InventoryEquipmentSlot

    Permalink
    Implicit information
    This member is added by an implicit conversion from InventoryEquipmentSlot to Ensuring[InventoryEquipmentSlot] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: (InventoryEquipmentSlot) ⇒ Boolean): InventoryEquipmentSlot

    Permalink
    Implicit information
    This member is added by an implicit conversion from InventoryEquipmentSlot to Ensuring[InventoryEquipmentSlot] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def ensuring(cond: Boolean, msg: ⇒ Any): InventoryEquipmentSlot

    Permalink
    Implicit information
    This member is added by an implicit conversion from InventoryEquipmentSlot to Ensuring[InventoryEquipmentSlot] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. def ensuring(cond: Boolean): InventoryEquipmentSlot

    Permalink
    Implicit information
    This member is added by an implicit conversion from InventoryEquipmentSlot to Ensuring[InventoryEquipmentSlot] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  19. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from InventoryEquipmentSlot to StringFormat[InventoryEquipmentSlot] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  21. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  22. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  28. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  29. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. def [B](y: B): (InventoryEquipmentSlot, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from InventoryEquipmentSlot to ArrowAssoc[InventoryEquipmentSlot] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from OffhandEquipmentSlot

Inherited from EquipmentSlot

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from InventoryEquipmentSlot to any2stringadd[InventoryEquipmentSlot]

Inherited by implicit conversion StringFormat from InventoryEquipmentSlot to StringFormat[InventoryEquipmentSlot]

Inherited by implicit conversion Ensuring from InventoryEquipmentSlot to Ensuring[InventoryEquipmentSlot]

Inherited by implicit conversion ArrowAssoc from InventoryEquipmentSlot to ArrowAssoc[InventoryEquipmentSlot]

Ungrouped