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

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 avatar
  Definition Classes
    objects
-  package ballistics
  Definition Classes
    objects
-  package ce
  Definition Classes
    objects
-  package definition
  Definition Classes
    objects
-  package entity
  Definition Classes
    objects
-  package equipment
  Definition Classes
    objects
-  package geometry
  Definition Classes
    objects
-  package guid
  Definition Classes
    objects
-  package inventory
  Definition Classes
    objects
- Container
- GridInventory
- InventoryDisarrayException
- InventoryEquipmentSlot
- InventoryItem
- InventoryTile
- LocallyRegisteredInventory
-  package loadouts
  Definition Classes
    objects
-  package locker
  Definition Classes
    objects
-  package serverobject
  Definition Classes
    objects
-  package teamwork
  Definition Classes
    objects
-  package vehicles
  Definition Classes
    objects
-  package vital
  Definition Classes
    objects
-  package zones
  Definition Classes
    objects

p

net.psforever.objects

# inventory

#### package inventory


Ordering

1. Alphabetic

Visibility

1. Public
2. Protected

### Type Members

1.  trait Container extends AnyRef

   This object is capable of storing ("stowing") `Equipment` within itself.
   The following objects are considered item containers: players (their own inventory), players (their corpse's loot), vehicles (their trunk), and lockers (contents of the player's fifth slot).

2.  class GridInventory extends Container

   An inventory are used to stow `Equipment` when it does not exist visually in the game world.
   Visually, an inventory is understood as a rectangular region divided into cellular units.

   An inventory are used to stow `Equipment` when it does not exist visually in the game world.
   Visually, an inventory is understood as a rectangular region divided into cellular units. The `Equipment` that is placed into the inventory can also be represented as smaller rectangles, also composed of cells. The same number of cells of the item must overlap with the same number of cells of the inventory. No two items may have cells that overlap. This "grid" maintains a spatial distinction between items when they get stowed.
   It is not necessary to actually have a structural representation of the "grid." Adhering to such a data structure does speed up the actions upon the inventory and its contents in certain cases (where noted). The `HashMap` of items is used for quick object lookup. Use of the `HashMap` only is hitherto referred as "using the inventory as a `List`." The `Array` of spatial GUIDs is used for quick collision lookup. Use of the `Array` only is hitherto referred as "using the inventory as a grid."

3.  final case class InventoryDisarrayException (message: String = "", cause: Throwable) extends Exception with Product with Serializable

   Some data in the grid portion of a `GridInventory` does not match against data that is expected to be found in the "list" portion of `GridInventory`.

   Some data in the grid portion of a `GridInventory` does not match against data that is expected to be found in the "list" portion of `GridInventory`. While merely eliminating the old data is possible, the discovery of this errant data could be hiding significantly greater issues, and these greater issues must be explored at a higher level of governance.

   message

     the explanation of why the exception was thrown

   cause

     any prior `Exception` that was thrown then wrapped in this one

4.  class InventoryEquipmentSlot extends OffhandEquipmentSlot

   A slot-like interface for a specific grid position in an inventory.

   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`.

5.  class InventoryItem extends AnyRef

   Represent the image placard that is used to visually and spatially manipulate an item placed into the grid-like inventory.

   Represent the image placard that is used to visually and spatially manipulate an item placed into the grid-like inventory. The unofficial term for this placard (the size of the placard) is a "tile." The size of the tile is usually fixed but the origin point of the tile can be changed.

6.  class InventoryTile extends AnyRef

   A "tile" represents the size of the icon placard that is used by `Equipment` when placed into an inventory or visible slot.

   A "tile" represents the size of the icon placard that is used by `Equipment` when placed into an inventory or visible slot. It is also used by some `ObjectDefinition`s to pass information about the size of an inventory itself.

   Exceptions thrown

     `IllegalArgumentException` if either the width or the height are less than zero

7.  class LocallyRegisteredInventory extends GridInventory

   An inventory that contains its own internal unique number system bound by a domain of numbers.

   An inventory that contains its own internal unique number system bound by a domain of numbers. When equipment is inserted into this inventory, the equipment is registered to it, assigned one of its internal unique numbers. The equipment must not already be registered to another unique number system for that reason. Upon being removed, the removed equipment is unregistered. The registration system adds another unspoken layer to `Capacity` as it imposes a total object count to the inventory.

   See also

     `NumberSourceHub`

     `RandomSelector`

     `SpecificNumberSource`

### Value Members

1.  object GridInventory
2.  object InventoryDisarrayException extends Serializable
3.  object InventoryItem
4.  object InventoryTile

### Ungrouped