Add a failover manager for script redundancy.
This commit is contained in:
@ -135,5 +135,29 @@ namespace IngameScript
|
||||
public void PrintLower(string text) { }
|
||||
public void UpdateTickCount() { }
|
||||
}
|
||||
|
||||
// A replacement for the main console if you don't want the display screens involved.
|
||||
// Good if you're using the Programmable Block's screens for your own purposes, but still
|
||||
// need PrefixedConsole support.
|
||||
//
|
||||
// Content will just be printed via Echo, and PrintLower and UpdateTickCount will simply print
|
||||
// an error.
|
||||
public class EchoConsole : IConsole
|
||||
{
|
||||
private Program _program;
|
||||
|
||||
public EchoConsole(Program program)
|
||||
{
|
||||
_program = program;
|
||||
}
|
||||
|
||||
public void Print(string text)
|
||||
{
|
||||
_program.Echo(text);
|
||||
}
|
||||
|
||||
public void PrintLower(string text) { }
|
||||
public void UpdateTickCount() { }
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user