More refactoring.
This commit is contained in:
@ -33,12 +33,12 @@ namespace IngameScript
|
||||
// Either use a reference to that instance directly where needed or use it to create PrefixedConsoles.
|
||||
public class MainConsole : IConsole
|
||||
{
|
||||
private Program _program;
|
||||
private int _maxLines;
|
||||
private List<string> _buffer;
|
||||
private StringBuilder _builder;
|
||||
private string _programName;
|
||||
private List<string> _buffer = new List<string>();
|
||||
private StringBuilder _builder = new StringBuilder();
|
||||
private int _tickCount = 0;
|
||||
private Program _program;
|
||||
private string _programName;
|
||||
private int _maxLines;
|
||||
|
||||
private const int DefaultMaxLines = 10;
|
||||
|
||||
@ -46,8 +46,6 @@ namespace IngameScript
|
||||
{
|
||||
_program = program;
|
||||
_programName = programName;
|
||||
_buffer = new List<string>();
|
||||
_builder = new StringBuilder();
|
||||
|
||||
// Check the PB's custom data for a maxlines directive.
|
||||
_program.Ini.TryParse(program.Me.CustomData);
|
||||
|
@ -11,11 +11,12 @@ namespace IngameScript
|
||||
public bool Running { get; }
|
||||
public int Step { get; set; }
|
||||
|
||||
private IMyDoor _door;
|
||||
public bool DeployOpen { get; set; }
|
||||
public bool LockOpen { get; set; }
|
||||
public bool LockClosed { get; set; }
|
||||
|
||||
private IMyDoor _door;
|
||||
|
||||
public SequenceableDoor(
|
||||
IMyDoor door,
|
||||
MyIni ini,
|
||||
|
@ -16,13 +16,12 @@ namespace IngameScript
|
||||
private IConsole _console;
|
||||
private string _name;
|
||||
|
||||
private SortedDictionary<int, List<ISequenceable>> _sequence;
|
||||
private SortedDictionary<int, List<ISequenceable>> _sequence = new SortedDictionary<int, List<ISequenceable>>();
|
||||
|
||||
public Sequencer(string name, IConsole console)
|
||||
public Sequencer(IConsoleProgram program, string name)
|
||||
{
|
||||
_name = name;
|
||||
_console = console;
|
||||
_sequence = new SortedDictionary<int, List<ISequenceable>>();
|
||||
_console = new PrefixedConsole(program.Console, _name);
|
||||
}
|
||||
|
||||
public void AddBlock(ISequenceable block)
|
||||
|
Reference in New Issue
Block a user