Class Debug
This class contains a set of ways to include custom debug information in the game, including Cheats and DebugLines.
Inheritance
Inherited Members
Namespace: TinyLife
Assembly: Tiny Life.dll
Syntax
public class Debug
Fields
Cheats
A set of regular expressions that resolve into a Debug.CheatDelegate. When a cheat is entered in the F1 menu, and it matches the expression, the Debug.CheatDelegate is invoked. To register new cheats, simply add them to this dictionary.
Declaration
public static readonly Dictionary<Regex, Debug.CheatDelegate> Cheats
Field Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.Text.RegularExpressions.Regex, Debug.CheatDelegate> |
DebugLines
A set of Debug.DebugDelegate that cause additional lines to displayed in the F1 menu. To register new debug lines, simply add them to this list. Keep in mind that, if too many debug lines are registered, they will go off-screen, so consider only displaying yours when holding certain hotkeys, or when they are necessary.
Declaration
public static readonly List<Debug.DebugDelegate> DebugLines
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<Debug.DebugDelegate> |
Methods
TryCheat(String)
Tries to execute the cheat with the given name or regular expression match.
Declaration
public static bool TryCheat(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The cheat to execute. |
Returns
Type | Description |
---|---|
System.Boolean | Whether the cheat was successfully exeucted. |