Sinespace Client 2025.3.19431
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'. | |
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'. | |
int | CountCopiesOfItem (int itemID) |
Checks if the user owns a specified item. | |
void | AddToHotbar (int index, int itemID) |
Adds the first found instance of itemID to the players first free hotbar entry. | |
void | RemoveFromHotbar (int index) |
Adds the first found instance of itemID to the players first free hotbar entry. | |
void | RequestRefresh () |
Requests a refresh of the users inventory (can occur max once per 120 seconds). Requires authorization. | |
![]() | |
void | ReportError (string error, bool fatal, UnityEngine.Object target=null) |
void | Initialise (SScript runtime, object wrapper) |
Properties | |
bool | Authorized [get] |
SInventoryItem[] | Items [get] |
Returns the users current loaded inventory. | |
![]() | |
virtual bool | Alive [get] |
DynValue | CachedData [get, set] |
Additional Inherited Members | |
![]() | |
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 |
override void SineSpace.Scripting.Player.SInventory.Initialise | ( | SScript | runtime, |
object | wrapper ) |
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.