# PSF-LoginServer - master - net.psforever.objects.inventory.InventoryEquipmentSlot
PSF - LoginServer - master - net.psforever.objects.inventory.InventoryEquipmentSlot
Keywords: PSF LoginServer master net.psforever.objects.inventory.InventoryEquipmentSlot

PSF-LoginServer - master < Back


# Packages

-  package root
  Definition Classes
    root
-  package net
  Definition Classes
    root
-  package psforever
  Definition Classes
    net
-  package objects
  Definition Classes
    psforever
-  package inventory
  Definition Classes
    objects
- Container
- GridInventory
- InventoryDisarrayException
- InventoryEquipmentSlot
- InventoryItem
- InventoryTile
- LocallyRegisteredInventory

c

net.psforever.objects.inventory

# InventoryEquipmentSlot

###

#### 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
OffhandEquipmentSlot, EquipmentSlot, AnyRef, Any

Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. InventoryEquipmentSlot
2. OffhandEquipmentSlot
3. EquipmentSlot
4. AnyRef
5. Any

1. Hide All
2. Show All

Visibility

1. Public
2. Protected

### Instance Constructors

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

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##: Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  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
5.  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
6.  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
7.  def Size: equipment.EquipmentSize.Value
   Definition Classes
     EquipmentSlot
8.  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
9.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
10.  def clone(): AnyRef
    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.CloneNotSupportedException]) @native()
11.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
12.  def equals(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef → Any
13.  def finalize(): Unit
    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.Throwable])
14.  final def getClass(): Class[_ <: AnyRef]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
15.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
16.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
17.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
18.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
19.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
20.  final def synchronized[T0](arg0: => T0): T0
    Definition Classes
      AnyRef
21.  def toString(): String
    Definition Classes
      AnyRef → Any
22.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
23.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
24.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException]) @native()

### Inherited from OffhandEquipmentSlot

### Inherited from EquipmentSlot

### Inherited from AnyRef

### Inherited from Any

### Ungrouped