Oops, interface implementations on Program don't carry over into the compiled game script. IConsoleProgram will have to just stand as a compile-time checking convenience.

This commit is contained in:
2025-02-14 16:20:50 -05:00
parent 372e9e22d2
commit 54f04a7cf0
3 changed files with 7 additions and 11 deletions

View File

@ -23,11 +23,6 @@ namespace IngameScript
// Properties that should be defined by the implementer.
MyIni Ini { get; }
Program.IConsole Console { get; }
// Inherited properties that we need access to
IMyGridProgramRuntimeInfo Runtime { get; }
IMyProgrammableBlock Me { get; }
Action<string> Echo { get; }
}
partial class Program
@ -46,13 +41,13 @@ namespace IngameScript
private List<string> _buffer = new List<string>();
private StringBuilder _builder = new StringBuilder();
private int _tickCount = 0;
private IConsoleProgram _program;
private Program _program;
private string _programName;
private int _maxLines = 10;
private const int DefaultMaxLines = 10;
public MainConsole(IConsoleProgram program, string programName)
public MainConsole(Program program, string programName)
{
_program = program;
_programName = programName;