Sinespace Client
2023.2.17543
Client-side scripting for Sinespace
|
Public Member Functions | |
override void | Initialise (SScript runtime, object wrapper) |
void | Authorize (Closure onAuthorized=null, Closure onRejected=null) |
Requests access to inventory functions, must be called prior to attempting to access inventory. As soon as the player has accepted the request, the Authorized attribute will be 'true'. More... | |
void | Authorize (Action onAuthorized=null, Action onRejected=null) |
Requests access to inventory functions, must be called prior to attempting to access inventory. As soon as the player has accepted the request, the Authorized attribute will be 'true'. More... | |
int | CountCopiesOfItem (int itemID) |
Checks if the user owns a specified item More... | |
void | AddToHotbar (int index, int itemID) |
Adds the first found instance of itemID to the players first free hotbar entry More... | |
void | RemoveFromHotbar (int index) |
Adds the first found instance of itemID to the players first free hotbar entry More... | |
void | RequestRefresh () |
Requests a refresh of the users inventory (can occur max once per 120 seconds). Requires authorization. More... | |
Public Member Functions inherited from ScriptClass< T > | |
void | ReportError (string error, bool fatal, UnityEngine.Object target=null) |
Public Member Functions inherited from ScriptClassWrapper< T > | |
override void | Initialise (SScript runtime, object wrapper) |
Properties | |
bool | Authorized [get] |
SInventoryItem[] | Items [get] |
Returns the users current loaded inventory More... | |
Properties inherited from ScriptClass< T > | |
override bool | Alive [get] |
Return if the component is alive. More... | |
virtual bool | Alive [get] |
DynValue | CachedData [get, set] |
Properties inherited from ScriptClassWrapper< T > | |
T | _wrap [get] |
Additional Inherited Members | |
Protected Member Functions inherited from ScriptClass< T > | |
void | Initialise (SScript runtime) |
void SineSpace.Scripting.Player.SInventory.AddToHotbar | ( | int | index, |
int | itemID | ||
) |
Adds the first found instance of itemID to the players first free hotbar entry
void SineSpace.Scripting.Player.SInventory.Authorize | ( | Action | onAuthorized = null , |
Action | onRejected = null |
||
) |
Requests access to inventory functions, must be called prior to attempting to access inventory. As soon as the player has accepted the request, the Authorized attribute will be 'true'.
onAuthorized | The onAuthorized c# action. |
onRejected | The onRejected c# action. |
void SineSpace.Scripting.Player.SInventory.Authorize | ( | Closure | onAuthorized = null , |
Closure | onRejected = null |
||
) |
Requests access to inventory functions, must be called prior to attempting to access inventory. As soon as the player has accepted the request, the Authorized attribute will be 'true'.
onAuthorized | The onAuthorized lua callback. |
onRejected | The onRejected lua callback. |
int SineSpace.Scripting.Player.SInventory.CountCopiesOfItem | ( | int | itemID | ) |
Checks if the user owns a specified item
itemID |
|
virtual |
Implements ScriptClass< T >.
void SineSpace.Scripting.Player.SInventory.RemoveFromHotbar | ( | int | index | ) |
Adds the first found instance of itemID to the players first free hotbar entry
void SineSpace.Scripting.Player.SInventory.RequestRefresh | ( | ) |
Requests a refresh of the users inventory (can occur max once per 120 seconds). Requires authorization.
|
get |
|
get |
Returns the users current loaded inventory