Changes

Jump to navigation Jump to search
Line 85: Line 85:  
== Helpful commands ==
 
== Helpful commands ==
 
The '''EXECUTE''' command will allow you to execute arbitrary [[SIPL]] code (which closely resembles C#) while the game is running. E.g. if you wanted to find the highest paid employee you could write <code>EXECUTE GameSettings.sActorManager.Actors.OrderByDescending(x.employee.Salary).First()</code> or if you wanted to color all selected rooms' exterior green you could write <code>EXECUTE Selected.Where(x is Room).ForEach(x.OutsideColor = Color(0,1,0))</code>.
 
The '''EXECUTE''' command will allow you to execute arbitrary [[SIPL]] code (which closely resembles C#) while the game is running. E.g. if you wanted to find the highest paid employee you could write <code>EXECUTE GameSettings.sActorManager.Actors.OrderByDescending(x.employee.Salary).First()</code> or if you wanted to color all selected rooms' exterior green you could write <code>EXECUTE Selected.Where(x is Room).ForEach(x.OutsideColor = Color(0,1,0))</code>.
 +
 +
Here are some handy variables and functions you can use with EXECUTE:
 +
{|class="wikitable"
 +
|GameSettings
 +
|References the currently active instance of GameSettings
 +
|-
 +
|SelectorController
 +
|References the currently active instance of SelectorController
 +
|-
 +
|MarketSimulation
 +
|References the currently active instance of MarketSimulation
 +
|-
 +
|Selected
 +
|List of objects currently selected in game
 +
|-
 +
|LastProduct
 +
|Reference to last product opened in a detail window
 +
|-
 +
|LastCompany
 +
|Reference to last company opened in a detail window
 +
|-
 +
|WorkItems
 +
|List of the active companies' tasks
 +
|-
 +
|Now
 +
|Current in-game date
 +
|-
 +
|CopyToClipboard(o)
 +
|Copies '''o''' to the clipboard, wrap your entire statement in this to put the result in the clipboard
 +
|-
 +
|DoSelect(o)
 +
|Selects o in-game, can be an object or a list, e.g. DoSelect(GameSettings.sActorManager.Actors)
 +
|-
 +
|}
    
The '''SHOW_INSPECTOR''' command opens a window that allows you to inspect all objects in the active scene.
 
The '''SHOW_INSPECTOR''' command opens a window that allows you to inspect all objects in the active scene.

Navigation menu