Changes

Jump to navigation Jump to search
661 bytes added ,  12:01, 12 June 2020
Line 307: Line 307:  
Finally, all SoftwareProduct's have their own local variables that you can read and write to for your scripts, just use '''Product.GetVar(VariableName, DefaultValue)''' and '''Product.PutVar(VariableName, Value)'''.
 
Finally, all SoftwareProduct's have their own local variables that you can read and write to for your scripts, just use '''Product.GetVar(VariableName, DefaultValue)''' and '''Product.PutVar(VariableName, Value)'''.
   −
==== Scope variables ====
+
==== Scope member ====
These are the variables each scope has access to. Note that you should use the '''LIST_SCOPE_MEMBERS''' console command, as described above, to get details.
+
These are the variables and methods each scope has access to. Note that you should use the '''LIST_SCOPE_MEMBERS''' console command, as described above, to get details.
    
<u>'''All scopes'''</u>
 
<u>'''All scopes'''</u>
Line 315: Line 315:  
*Company '''PlayerCompany'''
 
*Company '''PlayerCompany'''
 
*MarketSimulation '''MarketSimulation'''
 
*MarketSimulation '''MarketSimulation'''
 +
*string '''Localize(string input, optional string arguments)''' (Localizes a string)
 +
*void '''LaunchLawsuit(string subject, float amount, float difficulty)''' (subject should be an unlocalized string and the mod should include the localization)
 +
*SDateTime '''CreateDate(int year, int month, int day, int hour, int minute)''' (Create a new date to use where needed)
 +
*void '''AddPopUp(string text, float importance = 0.5, string icon = "Info", NotificationSound sfx = Neutral)''' (Adds a popup message in the top left, input string should be pre-localized, icons include "Exclamation", "Money", "Server", etc. Sfx includes Issue, Warning, Good, Neutral)
    
<u>'''DevScope'''</u>
 
<u>'''DevScope'''</u>

Navigation menu