ORK Framework  2.34.1
API Documentation
ORKFramework.InventoryAccessHandler Class Reference

Public Member Functions

virtual void UseCraftingRecipe (Combatant combatant, int recipeID, 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 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 SetMoney (Inventory inventory, int id, int quantity, bool showNotification, bool showConsole)
 Sets the amount of money in an inventory. More...
 
virtual void AddMoney (Inventory inventory, int id, int quantity, bool showNotification, bool showConsole)
 Adds money to an inventory. More...
 
virtual void SubMoney (Inventory inventory, int id, int quantity, bool showNotification, bool showConsole)
 Removes money from an inventory. More...
 
virtual void RemoveItemType (Inventory inventory, int typeID, bool removeSubTypes, bool removeMoney, bool removeItems, bool removeWeapons, bool removeArmor, bool showNotification, bool showConsole)
 Removes items of an item type from an inventory. More...
 
virtual ShopScreen OpenShop (IEventStarter starter, int shopID, string shopSceneID, int factionID)
 

Member Function Documentation

◆ Add()

virtual bool 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.

◆ AddMoney()

virtual void ORKFramework.InventoryAccessHandler.AddMoney ( Inventory  inventory,
int  id,
int  quantity,
bool  showNotification,
bool  showConsole 
)
virtual

Adds money to an inventory.

Parameters
inventoryThe inventory that will be used.
idThe ID/index of the currency.
quantityThe quantity that will be added.
showNotificationtrue if a notification should be displayed.
showConsoletrue if a console line should be added.

◆ AddToCraftingList()

virtual void 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.

◆ ClearCraftingList()

virtual void 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 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()

virtual void 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.

◆ Remove()

virtual void 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 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 ORKFramework.InventoryAccessHandler.RemoveItemType ( Inventory  inventory,
int  typeID,
bool  removeSubTypes,
bool  removeMoney,
bool  removeItems,
bool  removeWeapons,
bool  removeArmor,
bool  showNotification,
bool  showConsole 
)
virtual

Removes items of an item type from an inventory.

Parameters
inventoryThe inventory that will be used.
typeIDThe ID/index of the item type that will be removed.
removeSubTypestrue if sub types of the item type should be removed.
removeMoneytrue if money should be removed.
removeItemstrue if items should be removed.
removeWeaponstrue if weapons should be removed.
removeArmortrue if armors should be removed.
showNotificationtrue if a notification should be displayed.
showConsoletrue if a console line should be added.

◆ SetMoney()

virtual void ORKFramework.InventoryAccessHandler.SetMoney ( Inventory  inventory,
int  id,
int  quantity,
bool  showNotification,
bool  showConsole 
)
virtual

Sets the amount of money in an inventory.

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

◆ SubMoney()

virtual void ORKFramework.InventoryAccessHandler.SubMoney ( Inventory  inventory,
int  id,
int  quantity,
bool  showNotification,
bool  showConsole 
)
virtual

Removes money from an inventory.

Parameters
inventoryThe inventory that will be used.
idThe ID/index of the currency.
quantityThe quantity that will be removed.
showNotificationtrue if a notification should be displayed.
showConsoletrue if a console line should be added.

◆ UseCraftingRecipe()

virtual void ORKFramework.InventoryAccessHandler.UseCraftingRecipe ( Combatant  combatant,
int  recipeID,
NotifyBool  notify 
)
virtual

Creates the outcome of a crafting recipe.

Parameters
combatantThe combatant used to craft.
recipeIDThe ID/index of the crafting recipe.
notifyA callback function taking a bool parameter (true if crafting was successful).