An in-game save. This can be a menu item for a local save or the currently loaded save. Support for Steam Workshop coming soon (hopefully).
More...
|
| Game () |
| Initializes a new instance of the T:TechbloxModdingAPI.App.Game class without id. This is assumed to be the current game. More...
|
|
| Game (EGID id) |
| Initializes a new instance of the T:TechbloxModdingAPI.App.Game class. More...
|
|
| Game (uint id) |
| Initializes a new instance of the T:TechbloxModdingAPI.App.Game class. More...
|
|
void | AddDebugInfo (string id, Func< string > contentGetter) |
| Add information to the in-game debug display. When this object is garbage collected, this debug info is automatically removed. The provided getter function is called each frame so make sure it returns quickly. More...
|
|
void | EnableScreenshotTaker () |
| Enable the screenshot taker for updating the game's screenshot. Breaks the pause menu in a new save. More...
|
|
void | EnterGame () |
| Load the game save. This happens asynchronously, so when this method returns the game not loaded yet. Use the Game.Enter event to perform operations after the game has completely loaded. More...
|
|
void | ExitGame (bool async=false) |
| Return to the menu. Part of this always happens asynchronously, so when this method returns the game has not exited yet. Use the Client.EnterMenu event to perform operations after the game has completely exited. More...
|
|
Block[] | GetBlocksInGame (BlockIDs filter=BlockIDs.Invalid) |
| Gets the blocks in the game. This returns null when in a loading state, and throws AppStateException when in menu. More...
|
|
bool | RemoveDebugInfo (string id) |
| Remove information from the in-game debug display. More...
|
|
void | SaveGame () |
| Saves the game. Part of this happens asynchronously, so when this method returns the game has not been saved yet. More...
|
|
void | ToggleTimeMode () |
| Toggles the time mode. More...
|
|
|
static void | AddPersistentDebugInfo (string id, Func< string > contentGetter) |
| Add information to the in-game debug display. This debug info will be present for all games until it is manually removed. The provided getter function is called each frame so make sure it returns quickly. More...
|
|
static Game | CurrentGame () |
| Returns the currently loaded game. If in a menu, manipulating the returned object may not work as intended. More...
|
|
static Game | NewGame () |
| Creates a new game and adds it to the menu. If not in a menu, this will throw AppStateException. More...
|
|
static bool | RemovePersistentDebugInfo (string id) |
| Remove persistent information from the in-game debug display. More...
|
|
|
static EventHandler< GameEventArgs > | Edit [add, remove] |
| An event that fires whenever a game is switched to edit mode (time stopped mode). This does not fire when a game is loaded. More...
|
|
static EventHandler< GameEventArgs > | Enter [add, remove] |
| An event that fires right after a game is completely loaded. More...
|
|
static EventHandler< GameEventArgs > | Exit [add, remove] |
| An event that fires right before a game returns to the main menu. At this point, Techblox is transitioning state so many things are invalid/unstable here. More...
|
|
static EventHandler< GameEventArgs > | Simulate [add, remove] |
| An event that fires whenever a game is switched to simulation mode (time running mode). More...
|
|
An in-game save. This can be a menu item for a local save or the currently loaded save. Support for Steam Workshop coming soon (hopefully).
◆ Game() [1/3]
TechbloxModdingAPI.App.Game.Game |
( |
uint |
id | ) |
|
|
inline |
Initializes a new instance of the T:TechbloxModdingAPI.App.Game class.
- Parameters
-
◆ Game() [2/3]
TechbloxModdingAPI.App.Game.Game |
( |
EGID |
id | ) |
|
|
inline |
Initializes a new instance of the T:TechbloxModdingAPI.App.Game class.
- Parameters
-
◆ Game() [3/3]
TechbloxModdingAPI.App.Game.Game |
( |
| ) |
|
|
inline |
Initializes a new instance of the T:TechbloxModdingAPI.App.Game class without id. This is assumed to be the current game.
◆ AddDebugInfo()
void TechbloxModdingAPI.App.Game.AddDebugInfo |
( |
string |
id, |
|
|
Func< string > |
contentGetter |
|
) |
| |
|
inline |
Add information to the in-game debug display. When this object is garbage collected, this debug info is automatically removed. The provided getter function is called each frame so make sure it returns quickly.
- Parameters
-
id | Debug info identifier. |
contentGetter | A function that returns the current information. |
◆ AddPersistentDebugInfo()
static void TechbloxModdingAPI.App.Game.AddPersistentDebugInfo |
( |
string |
id, |
|
|
Func< string > |
contentGetter |
|
) |
| |
|
inlinestatic |
Add information to the in-game debug display. This debug info will be present for all games until it is manually removed. The provided getter function is called each frame so make sure it returns quickly.
- Parameters
-
id | Debug info identifier. |
contentGetter | A function that returns the current information. |
◆ CurrentGame()
static Game TechbloxModdingAPI.App.Game.CurrentGame |
( |
| ) |
|
|
inlinestatic |
Returns the currently loaded game. If in a menu, manipulating the returned object may not work as intended.
- Returns
- The current game.
◆ EnableScreenshotTaker()
void TechbloxModdingAPI.App.Game.EnableScreenshotTaker |
( |
| ) |
|
|
inline |
Enable the screenshot taker for updating the game's screenshot. Breaks the pause menu in a new save.
◆ EnterGame()
void TechbloxModdingAPI.App.Game.EnterGame |
( |
| ) |
|
|
inline |
Load the game save. This happens asynchronously, so when this method returns the game not loaded yet. Use the Game.Enter event to perform operations after the game has completely loaded.
◆ ExitGame()
void TechbloxModdingAPI.App.Game.ExitGame |
( |
bool |
async = false | ) |
|
|
inline |
Return to the menu. Part of this always happens asynchronously, so when this method returns the game has not exited yet. Use the Client.EnterMenu event to perform operations after the game has completely exited.
- Parameters
-
async | If set to true , do this async. |
◆ GetBlocksInGame()
Block [] TechbloxModdingAPI.App.Game.GetBlocksInGame |
( |
BlockIDs |
filter = BlockIDs.Invalid | ) |
|
|
inline |
Gets the blocks in the game. This returns null when in a loading state, and throws AppStateException when in menu.
- Returns
- The blocks in game.
- Parameters
-
filter | The block to search for. BlockIDs.Invalid will return all blocks. |
◆ Init()
static void TechbloxModdingAPI.App.Game.Init |
( |
| ) |
|
|
inlinestaticpackage |
◆ NewGame()
static Game TechbloxModdingAPI.App.Game.NewGame |
( |
| ) |
|
|
inlinestatic |
Creates a new game and adds it to the menu. If not in a menu, this will throw AppStateException.
- Returns
- The new game.
◆ RemoveDebugInfo()
bool TechbloxModdingAPI.App.Game.RemoveDebugInfo |
( |
string |
id | ) |
|
|
inline |
Remove information from the in-game debug display.
- Returns
-
true
, if debug info was removed, false
otherwise.
- Parameters
-
id | Debug info identifier. |
◆ RemovePersistentDebugInfo()
static bool TechbloxModdingAPI.App.Game.RemovePersistentDebugInfo |
( |
string |
id | ) |
|
|
inlinestatic |
Remove persistent information from the in-game debug display.
- Returns
-
true
, if debug info was removed, false
otherwise.
- Parameters
-
id | Debug info identifier. |
◆ SaveGame()
void TechbloxModdingAPI.App.Game.SaveGame |
( |
| ) |
|
|
inline |
Saves the game. Part of this happens asynchronously, so when this method returns the game has not been saved yet.
◆ ToggleTimeMode()
void TechbloxModdingAPI.App.Game.ToggleTimeMode |
( |
| ) |
|
|
inline |
◆ buildSimEventEngine
◆ debugOverlayEngine
◆ gameEngine
◆ menuEngine
◆ Description
string TechbloxModdingAPI.App.Game.Description |
|
getset |
The game's description.
The description.
◆ EGID
EGID TechbloxModdingAPI.App.Game.EGID |
|
get |
The game's unique menu EGID.
The egid.
◆ Id
uint TechbloxModdingAPI.App.Game.Id |
|
get |
The game's unique menu identifier.
The identifier.
◆ IsSimulating
bool TechbloxModdingAPI.App.Game.IsSimulating |
|
getset |
Whether the game is in simulation mode.
true
if is simulating; otherwise, false
.
◆ IsTimeRunning
bool TechbloxModdingAPI.App.Game.IsTimeRunning |
|
getset |
Whether the game is in time-running mode. Alias of IsSimulating.
true
if is time running; otherwise, false
.
◆ IsTimeStopped
bool TechbloxModdingAPI.App.Game.IsTimeStopped |
|
getset |
Whether the game is in time-stopped mode.
true
if is time stopped; otherwise, false
.
◆ MenuItem
bool TechbloxModdingAPI.App.Game.MenuItem |
|
get |
Whether the game is a (valid) menu item.
true
if menu item; otherwise, false
.
◆ Mode
◆ Name
string TechbloxModdingAPI.App.Game.Name |
|
getset |
The game's name.
The name.
◆ Path
string TechbloxModdingAPI.App.Game.Path |
|
getset |
The path to the game's save folder.
The path.
◆ WorkshopId
ulong TechbloxModdingAPI.App.Game.WorkshopId |
|
getset |
The Steam Workshop Id of the game save. In most cases this is invalid and returns 0, so this can be ignored.
The workshop identifier.
◆ Edit
An event that fires whenever a game is switched to edit mode (time stopped mode). This does not fire when a game is loaded.
◆ Enter
An event that fires right after a game is completely loaded.
◆ Exit
An event that fires right before a game returns to the main menu. At this point, Techblox is transitioning state so many things are invalid/unstable here.
◆ Simulate
EventHandler< GameEventArgs> TechbloxModdingAPI.App.Game.Simulate |
|
staticaddremove |
An event that fires whenever a game is switched to simulation mode (time running mode).
The documentation for this class was generated from the following file: