ORK Framework  2.26.1
API Documentation
ORKFramework.Inventory Class Reference
Inheritance diagram for ORKFramework.Inventory:
ORKFramework.ISaveData ORKFramework.IInventoryExchange

Public Member Functions

 Inventory (IContent content)
 
 Inventory (Combatant combatant)
 
 Inventory (Group g)
 
void Clear ()
 
void SetTimestamp (ITimestamp shortcut)
 
IContentSimple GetContent ()
 
Combatant GetOwner ()
 
bool IsPlayerOwned ()
 
void FireChanged ()
 
void CheckDataChanged (bool checkItems, bool checkWeapons, bool checkArmors, bool checkAIBehaviours, bool checkAIRulesets, bool checkCraftingRecipes)
 
void MarkFireChanged ()
 
void FireChanged (ItemDropType type, int id, int level, int quantity)
 
void AutoAddShortcut (IShortcut shortcut)
 
bool CanCollect (IShortcut item)
 
void CheckQuantity (IShortcut shortcut)
 
int GetAllowedQuantity (IShortcut shortcut, int quantity)
 
void AddOccupiedSpace (IInventoryShortcut shortcut)
 
bool CheckSpace (float space, bool add)
 
void GetAll (bool addMoney, bool addEmptyMoney, bool addItems, bool addWeapons, bool addArmor, bool addAIBehaviours, bool addAIRulesets, bool addCraftingRecipes, int typeID, bool checkParent, ref List< IShortcut > list)
 
void GetAll (bool addMoney, bool addEmptyMoney, bool addItems, bool addWeapons, bool addArmors, bool addAIBehaviours, bool addAIRulesets, bool addCraftingRecipes, int typeID, bool checkParent, ref List< IInventoryShortcut > list)
 
void Add (Inventory inventory)
 
void Add (ItemGain[] list, bool showNotification, bool showConsole)
 
void Add (List< IShortcut > list, bool showNotification, bool showConsole)
 
bool AddAccess (IShortcut item, bool showNotification, bool showConsole, bool markNewContent)
 
bool Add (IShortcut item, bool showNotification, bool showConsole, bool markNewContent)
 
void Remove (ItemGain[] item, bool showNotification, bool showConsole)
 
void Remove (List< IShortcut > list, bool showNotification, bool showConsole)
 
void RemoveAccess (IShortcut item, int quantity, bool showNotification, bool showConsole)
 
void Remove (IShortcut item, int quantity, bool showNotification, bool showConsole)
 
void Drop (ItemGain[] item, bool showNotification, bool showConsole)
 
void Drop (List< IShortcut > list, bool showNotification, bool showConsole)
 
void DropAccess (IShortcut item, int quantity, bool showNotification, bool showConsole)
 
void Drop (IShortcut item, int quantity, bool showNotification, bool showConsole)
 
bool Has (ItemGain[] list)
 
bool Has (ItemGain item)
 
bool Has (IShortcut item)
 
bool Has (List< IShortcut > list)
 
bool Has (IShortcut item, int quantity)
 
int GetCount (ItemGain item)
 
int GetCount (IShortcut item)
 
int GetAllowedCount (IShortcut item)
 
List< IInventoryShortcutGetStealable (bool addItems, bool addWeapons, bool addArmors)
 
bool HasSellable (bool addItems, bool addWeapons, bool addArmors, bool addAIBehaviours, bool addAIRulesets, bool addCraftingRecipes, List< int > itemTypes)
 
void GetSellable (ref List< ShopWrapperShortcut > list, bool addItems, bool addWeapons, bool addArmors, bool addAIBehaviours, bool addAIRulesets, bool addCraftingRecipes, List< int > itemTypes)
 
void RemoveItemType (int typeID, bool removeSubTypes, bool removeMoney, bool removeItems, bool removeWeapons, bool removeArmor, bool showNotification, bool showConsole)
 
void GetItemTypes (int parentType, ref List< int > list, bool onlySellable, bool addMoney, bool addEmptyMoney, bool addItems, bool addWeapons, bool addArmor, bool addAIBehaviours, bool addAIRulesets, bool addCraftingRecipes)
 
bool HasNewItemTypes (bool checkParent, List< int > types, bool onlySellable, bool addItems, bool addWeapons, bool addArmor, bool addAIBehaviours, bool addAIRulesets, bool addCraftingRecipes)
 
bool HasItemType (bool checkParent, int typeID, bool onlySellable, bool addMoney, bool addEmptyMoney, bool addItems, bool addWeapons, bool addArmor, bool addAIBehaviours, bool addAIRulesets, bool addCraftingRecipes, bool checkNewContent)
 
MoneyShortcut GetMoneyShortcut (int id)
 
int GetMoney (int id)
 
void SetMoneyAccess (int id, int quantity, bool showNotification, bool showConsole)
 
void SetMoney (int id, int quantity, bool showNotification, bool showConsole)
 
bool HasEnoughMoney (int id, int quantity)
 
void AddMoneyAccess (int id, int quantity, bool showNotification, bool showConsole)
 
void AddMoney (int id, int quantity, bool showNotification, bool showConsole)
 
void SubMoneyAccess (int id, int quantity, bool showNotification, bool showConsole)
 
void SubMoney (int id, int quantity, bool showNotification, bool showConsole)
 
int GetEquippedWeaponCount (int id)
 
int GetEquippedArmorCount (int id)
 
EquipShortcut GetEquipment (EquipShortcut equip)
 
List< EquipShortcutGetEquipmentByPart (int partID, bool weapons, bool armors)
 
bool HasEquipment ()
 
bool HasEquippedEquipment ()
 
DataObject SaveGame ()
 Used to save the data - you need to add the data to a ORKFramework.DataObject. More...
 
void LoadGame (DataObject data)
 Used to load the data - you need to get the data from the ORKFramework.DataObject. More...
 

Public Attributes

bool showNotifications = false
 

Properties

Notify Changed
 
InventoryChanged ContentChanged
 
int Count [get]
 
float LastTimestamp [get, set]
 
Combatant Owner [get]
 
Group Group [get]
 
bool HasOwners [get]
 
ItemInventory Items [get]
 
WeaponInventory Weapons [get]
 
ArmorInventory Armors [get]
 
CraftingInventory Crafting [get]
 
AIBehaviourInventory AIBehaviours [get]
 
AIRulesetInventory AIRulesets [get]
 
int MoneyCount [get]
 
bool IsEmpty [get]
 
float Space [get]
 
float TotalSpace [get]
 
bool Full [get]
 
- Properties inherited from ORKFramework.IInventoryExchange
bool IsEmpty [get]
 

Additional Inherited Members

- Events inherited from ORKFramework.IInventoryExchange
Notify Changed
 

Member Function Documentation

◆ LoadGame()

void ORKFramework.Inventory.LoadGame ( DataObject  data)

Used to load the data - you need to get the data from the ORKFramework.DataObject.

Parameters
dataA ORKFramework.DataObject containing the data.

Implements ORKFramework.ISaveData.

◆ SaveGame()

DataObject ORKFramework.Inventory.SaveGame ( )

Used to save the data - you need to add the data to a ORKFramework.DataObject.

Returns
A ORKFramework.DataObject containing the data.

Implements ORKFramework.ISaveData.