ORK Framework  3.17.1
API Documentation
GamingIsLove.ORKFramework.InventoryAccessHandler Class Reference

Public Member Functions

virtual void UseCraftingRecipe (Combatant combatant, CraftingRecipe recipe, NotifyBool notify)
 Creates the outcome of a crafting recipe. More...
 
virtual void AddToCraftingList (Combatant combatant, IShortcut item)
 Adds an item to the crafting list of a combatant. More...
 
virtual void RemoveFromCraftingList (Combatant combatant, IShortcut item)
 Removes an item from the crafting list of a combatant. More...
 
virtual void ClearCraftingList (Combatant combatant)
 Removes all items in a combatant's crafting list and returns them to the inventory. More...
 
virtual void CreateFromCraftingList (Combatant combatant, CraftingListCreationType creationType, bool consumeUnused, bool onlyKnownRecipes, Notify finished)
 Creates the outcome of a crafting recipe matching the items in the crafting list of a combatant. More...
 
virtual bool Add (Inventory inventory, IShortcut item, bool showNotification, bool showConsole, bool markNewContent)
 Adds an item to an inventory. More...
 
virtual IShortcut Split (Inventory inventory, IShortcut item, int newQuantity)
 Splits an item in the inventory into 2 stacks. More...
 
virtual bool Merge (Inventory inventory, IShortcut originalShortcut, IShortcut otherShortcut)
 Merges two items in the inventory into a single stack. More...
 
virtual void Remove (Inventory inventory, IShortcut item, int quantity, bool showNotification, bool showConsole)
 Removes an item from an inventory More...
 
virtual void Drop (Inventory inventory, IShortcut item, int quantity, bool showNotification, bool showConsole)
 Drops an item from an inventory into the game world. More...
 
virtual void Drop (Inventory inventory, IShortcut item, int quantity, bool showNotification, bool showConsole, List< GameObject > droppedObjects)
 Drops an item from an inventory into the game world. More...
 
virtual void SetCurrency (Inventory inventory, Currency currency, int quantity, bool showNotification, bool showConsole)
 Sets the amount of currency in an inventory. More...
 
virtual void RemoveItemType (Inventory inventory, ItemType itemType, bool removeSubTypes, bool removeCurrency, bool removeItems, bool removeEquipment, bool showNotification, bool showConsole)
 Removes items of an item type from an inventory. More...
 
virtual void ResetDurability (EquipShortcut equip, Combatant combatant)
 Resets durability of an equipment. More...
 
virtual void ChangeDurability (EquipShortcut equip, Combatant combatant, float value, SimpleOperator op)
 Changes the durability of an equipment. More...
 
virtual ShopScreen OpenShop (GameObject shopObject, NotifyBool notifyClosed, ShopSetting setting, string shopID, FactionSetting faction, Combatant user)
 

Member Function Documentation

◆ Add()

virtual bool GamingIsLove.ORKFramework.InventoryAccessHandler.Add ( Inventory  inventory,
IShortcut  item,
bool  showNotification,
bool  showConsole,
bool  markNewContent 
)
virtual

Adds an item to an inventory.

Parameters
inventoryThe inventory that will be used.
itemThe item that will be added.
showNotificationtrue if a notification should be displayed.
showConsoletrue if a console line should be added.
markNewContenttrue if the item should be marked as new content.
Returns
true if the item was added.

◆ AddToCraftingList()

virtual void GamingIsLove.ORKFramework.InventoryAccessHandler.AddToCraftingList ( Combatant  combatant,
IShortcut  item 
)
virtual

Adds an item to the crafting list of a combatant.

Parameters
combatantThe used combatant.
itemThe item that will be added.

◆ ChangeDurability()

virtual void GamingIsLove.ORKFramework.InventoryAccessHandler.ChangeDurability ( EquipShortcut  equip,
Combatant  combatant,
float  value,
SimpleOperator  op 
)
virtual

Changes the durability of an equipment.

Parameters
equipThe instance of the equipment.
combatantThe combatant used for the change (e.g. in case durability uses a formula).
valueThe value the durability will be changed by.
opThe operator used for the change.

◆ ClearCraftingList()

virtual void GamingIsLove.ORKFramework.InventoryAccessHandler.ClearCraftingList ( Combatant  combatant)
virtual

Removes all items in a combatant's crafting list and returns them to the inventory.

Parameters
combatantThe used combatant.

◆ CreateFromCraftingList()

virtual void GamingIsLove.ORKFramework.InventoryAccessHandler.CreateFromCraftingList ( Combatant  combatant,
CraftingListCreationType  creationType,
bool  consumeUnused,
bool  onlyKnownRecipes,
Notify  finished 
)
virtual

Creates the outcome of a crafting recipe matching the items in the crafting list of a combatant.

Parameters
combatantThe used combatant.
creationTypeThe creation type used (Exact, One, Multi).
consumeUnusedtrue if unused items in the crafting list should be consumed.
onlyKnownRecipestrue if only crafting recipes that are known to the combatant should be used.

◆ Drop() [1/2]

virtual void GamingIsLove.ORKFramework.InventoryAccessHandler.Drop ( Inventory  inventory,
IShortcut  item,
int  quantity,
bool  showNotification,
bool  showConsole 
)
virtual

Drops an item from an inventory into the game world.

Parameters
inventoryThe inventory that will be used.
itemThe item that will be dropped.
quantityThe quantity that will be dropped.
showNotificationtrue if a notification should be displayed.
showConsoletrue if a console line should be added.

◆ Drop() [2/2]

virtual void GamingIsLove.ORKFramework.InventoryAccessHandler.Drop ( Inventory  inventory,
IShortcut  item,
int  quantity,
bool  showNotification,
bool  showConsole,
List< GameObject >  droppedObjects 
)
virtual

Drops an item from an inventory into the game world.

Parameters
inventoryThe inventory that will be used.
itemThe item that will be dropped.
quantityThe quantity that will be dropped.
showNotificationtrue if a notification should be displayed.
showConsoletrue if a console line should be added.
droppedObjectsGame objects of dropped items will be added to this list.

◆ Merge()

virtual bool GamingIsLove.ORKFramework.InventoryAccessHandler.Merge ( Inventory  inventory,
IShortcut  originalShortcut,
IShortcut  otherShortcut 
)
virtual

Merges two items in the inventory into a single stack.

Parameters
inventoryThe inventory that will be used.
originalShortcutThe shortcut that will be added to.
otherShortcutThe shortcut that will be removed from.
Returns
true if the shortcuts where merged.

◆ Remove()

virtual void GamingIsLove.ORKFramework.InventoryAccessHandler.Remove ( Inventory  inventory,
IShortcut  item,
int  quantity,
bool  showNotification,
bool  showConsole 
)
virtual

Removes an item from an inventory

Parameters
inventoryThe inventory that will be used.
itemThe item that will be removed.
quantityThe quantity that will be removed.
showNotificationtrue if a notification should be displayed.
showConsoletrue if a console line should be added.

◆ RemoveFromCraftingList()

virtual void GamingIsLove.ORKFramework.InventoryAccessHandler.RemoveFromCraftingList ( Combatant  combatant,
IShortcut  item 
)
virtual

Removes an item from the crafting list of a combatant.

Parameters
combatantThe used combatant.
itemThe item that will be removed.

◆ RemoveItemType()

virtual void GamingIsLove.ORKFramework.InventoryAccessHandler.RemoveItemType ( Inventory  inventory,
ItemType  itemType,
bool  removeSubTypes,
bool  removeCurrency,
bool  removeItems,
bool  removeEquipment,
bool  showNotification,
bool  showConsole 
)
virtual

Removes items of an item type from an inventory.

Parameters
inventoryThe inventory that will be used.
itemTypeThe item type that will be removed.
removeSubTypestrue if sub types of the item type should be removed.
removeCurrencytrue if currency should be removed.
removeItemstrue if items should be removed.
removeEquipmenttrue if equipment should be removed.
showNotificationtrue if a notification should be displayed.
showConsoletrue if a console line should be added.

◆ ResetDurability()

virtual void GamingIsLove.ORKFramework.InventoryAccessHandler.ResetDurability ( EquipShortcut  equip,
Combatant  combatant 
)
virtual

Resets durability of an equipment.

Parameters
equipThe instance of the equipment.
combatantThe combatant used for resetting durability (e.g. in case durability uses a formula).

◆ SetCurrency()

virtual void GamingIsLove.ORKFramework.InventoryAccessHandler.SetCurrency ( Inventory  inventory,
Currency  currency,
int  quantity,
bool  showNotification,
bool  showConsole 
)
virtual

Sets the amount of currency in an inventory.

Parameters
inventoryThe inventory that will be used.
currencyThe currency.
quantityThe quantity the currency will be set to.
showNotificationtrue if a notification should be displayed.
showConsoletrue if a console line should be added.

◆ Split()

virtual IShortcut GamingIsLove.ORKFramework.InventoryAccessHandler.Split ( Inventory  inventory,
IShortcut  item,
int  newQuantity 
)
virtual

Splits an item in the inventory into 2 stacks.

Parameters
inventoryThe inventory that will be used.
itemThe item that will be split.
newQuantityThe quantity of the new stack (removed from old stack).
Returns
The new shortcut that was split off.

◆ UseCraftingRecipe()

virtual void GamingIsLove.ORKFramework.InventoryAccessHandler.UseCraftingRecipe ( Combatant  combatant,
CraftingRecipe  recipe,
NotifyBool  notify 
)
virtual

Creates the outcome of a crafting recipe.

Parameters
combatantThe combatant used to craft.
recipeThe crafting recipe.
notifyA callback function taking a bool parameter (true if crafting was successful).