Barotrauma Server
Loading...
Searching...
No Matches
Barotrauma.Inventory.ItemSlot Class Reference

Public Member Functions

 ItemSlot (Inventory inventory)
 
bool CanBePut (Item item, bool ignoreCondition=false)
 
bool CanBePut (ItemPrefab itemPrefab, float? condition=null, int? quality=null)
 
int HowManyCanBePut (ItemPrefab itemPrefab, int? maxStackSize=null, float? condition=null, bool ignoreItemsInSlot=false)
 
Parameters
maxStackSizeDefaults to ItemPrefab.MaxStackSize if null

 
void Add (Item item)
 
Item RemoveItem ()
 Removes one item from the slot.
 
void RemoveItem (Item item)
 
void RemoveAllItems ()
 Removes all items from the slot.
 
void RemoveWhere (Func< Item, bool > predicate)
 
bool Any ()
 
bool Empty ()
 
Item First ()
 
Item FirstOrDefault ()
 
Item LastOrDefault ()
 
bool Contains (Item item)
 

Public Attributes

bool HideIfEmpty
 

Properties

IReadOnlyList< ItemItems [get]
 

Constructor & Destructor Documentation

◆ ItemSlot()

Barotrauma.Inventory.ItemSlot.ItemSlot ( Inventory inventory)

Member Function Documentation

◆ Add()

void Barotrauma.Inventory.ItemSlot.Add ( Item item)

◆ Any()

bool Barotrauma.Inventory.ItemSlot.Any ( )

◆ CanBePut() [1/2]

bool Barotrauma.Inventory.ItemSlot.CanBePut ( Item item,
bool ignoreCondition = false )

◆ CanBePut() [2/2]

bool Barotrauma.Inventory.ItemSlot.CanBePut ( ItemPrefab itemPrefab,
float? condition = null,
int? quality = null )

◆ Contains()

bool Barotrauma.Inventory.ItemSlot.Contains ( Item item)

◆ Empty()

bool Barotrauma.Inventory.ItemSlot.Empty ( )

◆ First()

Item Barotrauma.Inventory.ItemSlot.First ( )

◆ FirstOrDefault()

Item Barotrauma.Inventory.ItemSlot.FirstOrDefault ( )

◆ HowManyCanBePut()

int Barotrauma.Inventory.ItemSlot.HowManyCanBePut ( ItemPrefab itemPrefab,
int? maxStackSize = null,
float? condition = null,
bool ignoreItemsInSlot = false )

Parameters
maxStackSizeDefaults to ItemPrefab.MaxStackSize if null

◆ LastOrDefault()

Item Barotrauma.Inventory.ItemSlot.LastOrDefault ( )

◆ RemoveAllItems()

void Barotrauma.Inventory.ItemSlot.RemoveAllItems ( )

Removes all items from the slot.

◆ RemoveItem() [1/2]

Item Barotrauma.Inventory.ItemSlot.RemoveItem ( )

Removes one item from the slot.

◆ RemoveItem() [2/2]

void Barotrauma.Inventory.ItemSlot.RemoveItem ( Item item)

◆ RemoveWhere()

void Barotrauma.Inventory.ItemSlot.RemoveWhere ( Func< Item, bool > predicate)

Member Data Documentation

◆ HideIfEmpty

bool Barotrauma.Inventory.ItemSlot.HideIfEmpty

Property Documentation

◆ Items

IReadOnlyList<Item> Barotrauma.Inventory.ItemSlot.Items
get

The documentation for this class was generated from the following file: