wiki.sine.space | sinespace

Difference between revisions of "Scripting/SUserRegions"

From wiki.sine.space
Jump to: navigation, search
Line 1: Line 1:
 
=Public Attributes=
 
=Public Attributes=
  
{{ScriptFunction|int|SubscriptionTier| |description|5=|6=<pre></pre>}}
+
{{ScriptFunction|int|SubscriptionTier| |The subscription tier indicates which type of premium memberhsip the player has. (As found in "Region" window)|5=|6=<pre>--Make's a UIText show this User's Regions' current Subscription Tier
  
{{ScriptFunction|int|NumberOfRegions|{}|description|5=|6=<pre></pre>}}
+
textObject = Space.Host.GetReference("TheTextReference") --add to References section in Scripting Runtime
  
{{ScriptFunction|int|UsersPerRegion|{}|description|5=|6=<pre></pre>}}
+
function GetUserRegionsComplete(SUserRegions)
 +
  local r = SUserRegions.SubscriptionTier
 +
  text.UIText.Text = r
 +
end
  
{{ScriptFunction|int|FileSize|{}|description|5=|6=<pre></pre>}}
+
Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)</pre>}}
  
{{ScriptFunction|string|SubscriptionName|{}|description|5=|6=<pre></pre>}}
+
{{ScriptFunction|int|NumberOfRegions| |The number of regions the player has. (As found in "Region" window)|5=|6=<pre>--Make's a UIText show this User's Regions' current NumberOfRegions
  
{{ScriptFunction|SPublicRegion[]|AvailableRegions|{}|description|5=|6=<pre></pre>}}
+
textObject = Space.Host.GetReference("TheTextReference") --add to References section in Scripting Runtime
 +
 
 +
function GetUserRegionsComplete(SUserRegions)
 +
  local r = SUserRegions.NumberOfRegions
 +
  text.UIText.Text = r
 +
end
 +
 
 +
Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)</pre>}}
 +
 
 +
{{ScriptFunction|int|UsersPerRegion| |The max number of users allowed per region. ("Concurrency" as found in "Region" window).|5=|6=<pre>--Make's a UIText show this User's Regions' current UsersPerRegion
 +
 
 +
textObject = Space.Host.GetReference("TheTextReference") --add to References section in Scripting Runtime
 +
 
 +
function GetUserRegionsComplete(SUserRegions)
 +
  local r = SUserRegions.UsersPerRegion
 +
  text.UIText.Text = r
 +
end
 +
 
 +
Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)</pre>}}
 +
 
 +
{{ScriptFunction|int|FileSize| |The maximum MB size the player's regions can be. ("Max Region SizE" in the "Region" window)|5=|6=<pre>--Make's a UIText show this User's Regions' current FileSize
 +
 
 +
textObject = Space.Host.GetReference("TheTextReference") --add to References section in Scripting Runtime
 +
 
 +
function GetUserRegionsComplete(SUserRegions)
 +
  local r = SUserRegions.FileSize
 +
  text.UIText.Text = r
 +
end
 +
 
 +
Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)</pre>}}
 +
 
 +
{{ScriptFunction|string|SubscriptionName| |The name of the current player's premium subscription (as found in "Region" window)|5=|6=<pre>--Make's a UIText show this User's Regions' current SubscriptionName
 +
 
 +
textObject = Space.Host.GetReference("TheTextReference") --add to References section in Scripting Runtime
 +
 
 +
function GetUserRegionsComplete(SUserRegions)
 +
  local r = SUserRegions.SubscriptionName
 +
  text.UIText.Text = r
 +
end
 +
 
 +
Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)</pre>}}
 +
 
 +
{{ScriptFunction|SPublicRegion[]|AvailableRegions| |Returns an array of SPublicRegion which is a group of data for each of the user's available regions. |5=|6=<pre></pre>}}
  
  

Revision as of 18:58, 21 March 2022

Public Attributes

SubscriptionTier

int SubscriptionTier

The subscription tier indicates which type of premium memberhsip the player has. (As found in "Region" window)


--Make's a UIText show this User's Regions' current Subscription Tier

textObject = Space.Host.GetReference("TheTextReference") --add to References section in Scripting Runtime

function GetUserRegionsComplete(SUserRegions)
  local r = SUserRegions.SubscriptionTier
  text.UIText.Text = r
end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

NumberOfRegions

int NumberOfRegions

The number of regions the player has. (As found in "Region" window)


--Make's a UIText show this User's Regions' current NumberOfRegions

textObject = Space.Host.GetReference("TheTextReference") --add to References section in Scripting Runtime

function GetUserRegionsComplete(SUserRegions)
  local r = SUserRegions.NumberOfRegions
  text.UIText.Text = r
end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

UsersPerRegion

int UsersPerRegion

The max number of users allowed per region. ("Concurrency" as found in "Region" window).


--Make's a UIText show this User's Regions' current UsersPerRegion

textObject = Space.Host.GetReference("TheTextReference") --add to References section in Scripting Runtime

function GetUserRegionsComplete(SUserRegions)
  local r = SUserRegions.UsersPerRegion
  text.UIText.Text = r
end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

FileSize

int FileSize

The maximum MB size the player's regions can be. ("Max Region SizE" in the "Region" window)


--Make's a UIText show this User's Regions' current FileSize

textObject = Space.Host.GetReference("TheTextReference") --add to References section in Scripting Runtime

function GetUserRegionsComplete(SUserRegions)
  local r = SUserRegions.FileSize
  text.UIText.Text = r
end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

SubscriptionName

string SubscriptionName

The name of the current player's premium subscription (as found in "Region" window)


--Make's a UIText show this User's Regions' current SubscriptionName

textObject = Space.Host.GetReference("TheTextReference") --add to References section in Scripting Runtime

function GetUserRegionsComplete(SUserRegions)
  local r = SUserRegions.SubscriptionName
  text.UIText.Text = r
end

Space.Grid.GetEnabledUserRegions(GetUserRegionsComplete)

AvailableRegions

[[Scripting/SPublicRegion[]|SPublicRegion[]]] AvailableRegions

Returns an array of SPublicRegion which is a group of data for each of the user's available regions.