PixelCrushers.DialogueSystem.SInventory.SInventoryLua Class Reference

This static class provides Lua functions to access S-Inventory. More...

Static Public Member Functions

static void RegisterLuaFunctions ()
 Registers the S-Inventory Lua functions with the Dialogue System. More...
 
static GameObject FindActor (string actor)
 Finds an actor by its GameObject name. More...
 
static T GetActorComponent< T > (string actor)
 Gets the InventoryManager on a GameObject with the specified name. More...
 
static T GetActorComponent< T > (Transform actor)
 Gets the InventoryManager on a GameObject with the specified name. More...
 
static string GetActorName (string actor)
 Gets the actor name to use in the Lua environment. More...
 
static string GetCurrencyFieldName (string currencyName)
 
static double GetCurrency (string subject, string currencyName)
 
static void SetCurrency (string subject, string currencyName, double amount)
 
static void RefreshCurrencyUI (InventoryManager invManager)
 
static void AdjustCurrency (string subject, string currencyName, double amount)
 
static double GetItemAmount (string subject, string itemName)
 
static void AddItem (string subject, string itemName, double amount)
 
static void AddItem (Transform actor, string itemName, double amount)
 
static void AddItem (InventoryManager invManager, string itemName, double amount)
 
static void RemoveItem (string subject, string itemName, double amount)
 
static void RemoveItem (Transform actor, string itemName, double amount)
 
static void RemoveItem (InventoryManager invManager, string itemName, double amount)
 
static void RefreshItemUI (InventoryManager invManager)
 
static S_Inventory.Item FindItemInInventory (InventoryManager invManager, string itemName)
 
static S_Inventory.Item InstantiateItemPrefab (string itemName)
 
static string SanitizeItemName (string s)
 
static string DesanitizeItemName (string s)
 
static void RegisterLuaFunctions ()
 Registers the S-Inventory Lua functions with the Dialogue System. More...
 
static GameObject FindActor (string actor)
 Finds an actor by its GameObject name. More...
 
static T GetActorComponent< T > (string actor)
 Gets the InventoryManager on a GameObject with the specified name. More...
 
static T GetActorComponent< T > (Transform actor)
 Gets the InventoryManager on a GameObject with the specified name. More...
 
static string GetActorName (string actor)
 Gets the actor name to use in the Lua environment. More...
 
static string GetCurrencyFieldName (string currencyName)
 
static double GetCurrency (string subject, string currencyName)
 
static void SetCurrency (string subject, string currencyName, double amount)
 
static void RefreshCurrencyUI (InventoryManager invManager)
 
static void AdjustCurrency (string subject, string currencyName, double amount)
 
static double GetItemAmount (string subject, string itemName)
 
static void AddItem (string subject, string itemName, double amount)
 
static void AddItem (Transform actor, string itemName, double amount)
 
static void AddItem (InventoryManager invManager, string itemName, double amount)
 
static void RemoveItem (string subject, string itemName, double amount)
 
static void RemoveItem (Transform actor, string itemName, double amount)
 
static void RemoveItem (InventoryManager invManager, string itemName, double amount)
 
static void RefreshItemUI (InventoryManager invManager)
 
static S_Inventory.Item FindItemInInventory (InventoryManager invManager, string itemName)
 
static S_Inventory.Item InstantiateItemPrefab (string itemName)
 
static string SanitizeItemName (string s)
 
static string DesanitizeItemName (string s)
 

Static Public Attributes

const string MaxItemsFieldName = "MaxItems"
 
const string ItemNamesFieldName = "ItemNames"
 
const string ItemAmountsFieldName = "ItemAmounts"
 
const string EquipmentNamesFieldName = "EquipmentNames"
 
const string EquipmentAmountsFieldName = "EquipmentAmounts"
 
const string SkillBarNamesFieldName = "SkillBarNames"
 
const string SkillBarAmountsFieldName = "SkillBarAmounts"
 

Detailed Description

This static class provides Lua functions to access S-Inventory.

You must call RegisterLuaFunctions() at least once before using the Lua functions.

Member Function Documentation

◆ AddItem() [1/6]

static void PixelCrushers.DialogueSystem.SInventory.SInventoryLua.AddItem ( InventoryManager  invManager,
string  itemName,
double  amount 
)
static

◆ AddItem() [2/6]

static void PixelCrushers.DialogueSystem.SInventory.SInventoryLua.AddItem ( InventoryManager  invManager,
string  itemName,
double  amount 
)
static

◆ AddItem() [3/6]

static void PixelCrushers.DialogueSystem.SInventory.SInventoryLua.AddItem ( string  subject,
string  itemName,
double  amount 
)
static

◆ AddItem() [4/6]

static void PixelCrushers.DialogueSystem.SInventory.SInventoryLua.AddItem ( string  subject,
string  itemName,
double  amount 
)
static

◆ AddItem() [5/6]

static void PixelCrushers.DialogueSystem.SInventory.SInventoryLua.AddItem ( Transform  actor,
string  itemName,
double  amount 
)
static

◆ AddItem() [6/6]

static void PixelCrushers.DialogueSystem.SInventory.SInventoryLua.AddItem ( Transform  actor,
string  itemName,
double  amount 
)
static

◆ AdjustCurrency() [1/2]

static void PixelCrushers.DialogueSystem.SInventory.SInventoryLua.AdjustCurrency ( string  subject,
string  currencyName,
double  amount 
)
static

◆ AdjustCurrency() [2/2]

static void PixelCrushers.DialogueSystem.SInventory.SInventoryLua.AdjustCurrency ( string  subject,
string  currencyName,
double  amount 
)
static

◆ DesanitizeItemName() [1/2]

static string PixelCrushers.DialogueSystem.SInventory.SInventoryLua.DesanitizeItemName ( string  s)
static

◆ DesanitizeItemName() [2/2]

static string PixelCrushers.DialogueSystem.SInventory.SInventoryLua.DesanitizeItemName ( string  s)
static

◆ FindActor() [1/2]

static GameObject PixelCrushers.DialogueSystem.SInventory.SInventoryLua.FindActor ( string  actor)
static

Finds an actor by its GameObject name.

Returns
The actor.
Parameters
actorActor.

◆ FindActor() [2/2]

static GameObject PixelCrushers.DialogueSystem.SInventory.SInventoryLua.FindActor ( string  actor)
static

Finds an actor by its GameObject name.

Returns
The actor.
Parameters
actorActor.

◆ FindItemInInventory() [1/2]

static S_Inventory.Item PixelCrushers.DialogueSystem.SInventory.SInventoryLua.FindItemInInventory ( InventoryManager  invManager,
string  itemName 
)
static

◆ FindItemInInventory() [2/2]

static S_Inventory.Item PixelCrushers.DialogueSystem.SInventory.SInventoryLua.FindItemInInventory ( InventoryManager  invManager,
string  itemName 
)
static

◆ GetActorComponent< T >() [1/4]

static T PixelCrushers.DialogueSystem.SInventory.SInventoryLua.GetActorComponent< T > ( string  actor)
static

Gets the InventoryManager on a GameObject with the specified name.

Returns
The inventory manager.
Parameters
actorActor.
Type Constraints
T :Component 

◆ GetActorComponent< T >() [2/4]

static T PixelCrushers.DialogueSystem.SInventory.SInventoryLua.GetActorComponent< T > ( string  actor)
static

Gets the InventoryManager on a GameObject with the specified name.

Returns
The inventory manager.
Parameters
actorActor.
Type Constraints
T :Component 

◆ GetActorComponent< T >() [3/4]

static T PixelCrushers.DialogueSystem.SInventory.SInventoryLua.GetActorComponent< T > ( Transform  actor)
static

Gets the InventoryManager on a GameObject with the specified name.

Returns
The inventory manager.
Parameters
actorActor.
Type Constraints
T :Component 

◆ GetActorComponent< T >() [4/4]

static T PixelCrushers.DialogueSystem.SInventory.SInventoryLua.GetActorComponent< T > ( Transform  actor)
static

Gets the InventoryManager on a GameObject with the specified name.

Returns
The inventory manager.
Parameters
actorActor.
Type Constraints
T :Component 

◆ GetActorName() [1/2]

static string PixelCrushers.DialogueSystem.SInventory.SInventoryLua.GetActorName ( string  actor)
static

Gets the actor name to use in the Lua environment.

Returns
The actor name.
Parameters
actorActor.

◆ GetActorName() [2/2]

static string PixelCrushers.DialogueSystem.SInventory.SInventoryLua.GetActorName ( string  actor)
static

Gets the actor name to use in the Lua environment.

Returns
The actor name.
Parameters
actorActor.

◆ GetCurrency() [1/2]

static double PixelCrushers.DialogueSystem.SInventory.SInventoryLua.GetCurrency ( string  subject,
string  currencyName 
)
static

◆ GetCurrency() [2/2]

static double PixelCrushers.DialogueSystem.SInventory.SInventoryLua.GetCurrency ( string  subject,
string  currencyName 
)
static

◆ GetCurrencyFieldName() [1/2]

static string PixelCrushers.DialogueSystem.SInventory.SInventoryLua.GetCurrencyFieldName ( string  currencyName)
static

◆ GetCurrencyFieldName() [2/2]

static string PixelCrushers.DialogueSystem.SInventory.SInventoryLua.GetCurrencyFieldName ( string  currencyName)
static

◆ GetItemAmount() [1/2]

static double PixelCrushers.DialogueSystem.SInventory.SInventoryLua.GetItemAmount ( string  subject,
string  itemName 
)
static

◆ GetItemAmount() [2/2]

static double PixelCrushers.DialogueSystem.SInventory.SInventoryLua.GetItemAmount ( string  subject,
string  itemName 
)
static

◆ InstantiateItemPrefab() [1/2]

static S_Inventory.Item PixelCrushers.DialogueSystem.SInventory.SInventoryLua.InstantiateItemPrefab ( string  itemName)
static

◆ InstantiateItemPrefab() [2/2]

static S_Inventory.Item PixelCrushers.DialogueSystem.SInventory.SInventoryLua.InstantiateItemPrefab ( string  itemName)
static

◆ RefreshCurrencyUI() [1/2]

static void PixelCrushers.DialogueSystem.SInventory.SInventoryLua.RefreshCurrencyUI ( InventoryManager  invManager)
static

◆ RefreshCurrencyUI() [2/2]

static void PixelCrushers.DialogueSystem.SInventory.SInventoryLua.RefreshCurrencyUI ( InventoryManager  invManager)
static

◆ RefreshItemUI() [1/2]

static void PixelCrushers.DialogueSystem.SInventory.SInventoryLua.RefreshItemUI ( InventoryManager  invManager)
static

◆ RefreshItemUI() [2/2]

static void PixelCrushers.DialogueSystem.SInventory.SInventoryLua.RefreshItemUI ( InventoryManager  invManager)
static

◆ RegisterLuaFunctions() [1/2]

static void PixelCrushers.DialogueSystem.SInventory.SInventoryLua.RegisterLuaFunctions ( )
static

Registers the S-Inventory Lua functions with the Dialogue System.

◆ RegisterLuaFunctions() [2/2]

static void PixelCrushers.DialogueSystem.SInventory.SInventoryLua.RegisterLuaFunctions ( )
static

Registers the S-Inventory Lua functions with the Dialogue System.

◆ RemoveItem() [1/6]

static void PixelCrushers.DialogueSystem.SInventory.SInventoryLua.RemoveItem ( InventoryManager  invManager,
string  itemName,
double  amount 
)
static

◆ RemoveItem() [2/6]

static void PixelCrushers.DialogueSystem.SInventory.SInventoryLua.RemoveItem ( InventoryManager  invManager,
string  itemName,
double  amount 
)
static

◆ RemoveItem() [3/6]

static void PixelCrushers.DialogueSystem.SInventory.SInventoryLua.RemoveItem ( string  subject,
string  itemName,
double  amount 
)
static

◆ RemoveItem() [4/6]

static void PixelCrushers.DialogueSystem.SInventory.SInventoryLua.RemoveItem ( string  subject,
string  itemName,
double  amount 
)
static

◆ RemoveItem() [5/6]

static void PixelCrushers.DialogueSystem.SInventory.SInventoryLua.RemoveItem ( Transform  actor,
string  itemName,
double  amount 
)
static

◆ RemoveItem() [6/6]

static void PixelCrushers.DialogueSystem.SInventory.SInventoryLua.RemoveItem ( Transform  actor,
string  itemName,
double  amount 
)
static

◆ SanitizeItemName() [1/2]

static string PixelCrushers.DialogueSystem.SInventory.SInventoryLua.SanitizeItemName ( string  s)
static

◆ SanitizeItemName() [2/2]

static string PixelCrushers.DialogueSystem.SInventory.SInventoryLua.SanitizeItemName ( string  s)
static

◆ SetCurrency() [1/2]

static void PixelCrushers.DialogueSystem.SInventory.SInventoryLua.SetCurrency ( string  subject,
string  currencyName,
double  amount 
)
static

◆ SetCurrency() [2/2]

static void PixelCrushers.DialogueSystem.SInventory.SInventoryLua.SetCurrency ( string  subject,
string  currencyName,
double  amount 
)
static

Member Data Documentation

◆ EquipmentAmountsFieldName

const string PixelCrushers.DialogueSystem.SInventory.SInventoryLua.EquipmentAmountsFieldName = "EquipmentAmounts"
static

◆ EquipmentNamesFieldName

const string PixelCrushers.DialogueSystem.SInventory.SInventoryLua.EquipmentNamesFieldName = "EquipmentNames"
static

◆ ItemAmountsFieldName

const string PixelCrushers.DialogueSystem.SInventory.SInventoryLua.ItemAmountsFieldName = "ItemAmounts"
static

◆ ItemNamesFieldName

const string PixelCrushers.DialogueSystem.SInventory.SInventoryLua.ItemNamesFieldName = "ItemNames"
static

◆ MaxItemsFieldName

const string PixelCrushers.DialogueSystem.SInventory.SInventoryLua.MaxItemsFieldName = "MaxItems"
static

◆ SkillBarAmountsFieldName

const string PixelCrushers.DialogueSystem.SInventory.SInventoryLua.SkillBarAmountsFieldName = "SkillBarAmounts"
static

◆ SkillBarNamesFieldName

const string PixelCrushers.DialogueSystem.SInventory.SInventoryLua.SkillBarNamesFieldName = "SkillBarNames"
static

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