Don't actually use the IConsoleProgram interface in code since it would require a huge number of casts and everything is inside Program anyway.

This commit is contained in:
2025-02-11 14:36:24 -05:00
parent 06be2bf30e
commit 66fff69396
5 changed files with 10 additions and 7 deletions

View File

@ -11,6 +11,9 @@ namespace IngameScript
{
// A Program that supports consoles by initializing a MyIni instance
// and providing a public console for member objects to refer back to.
// If you're using this library it is highly advised that you implement this interface
// for a clean, consistent way to avoid errors.
//
// (It is probably an anti-pattern that this lives outside of the Program class,
// but we can't find a cleaner way to implement this.)
public interface IConsoleProgram

View File

@ -18,7 +18,7 @@ namespace IngameScript
private SortedDictionary<int, List<ISequenceable>> _sequence = new SortedDictionary<int, List<ISequenceable>>();
public Sequencer(IConsoleProgram program, string name)
public Sequencer(Program program, string name)
{
Name = name;
_console = new PrefixedConsole(program.Console, Name);