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:
@ -14,7 +14,7 @@ namespace IngameScript
|
||||
public bool Triggered { get; private set; } = false;
|
||||
public List<IMyAirVent> Vents { get; } = new List<IMyAirVent>();
|
||||
|
||||
private IConsoleProgram _program;
|
||||
private Program _program;
|
||||
private List<IMyDoor> _doors = new List<IMyDoor>();
|
||||
private List<IMyTextSurface> _displays = new List<IMyTextSurface>();
|
||||
private List<IMyLightingBlock> _lights = new List<IMyLightingBlock>();
|
||||
@ -23,12 +23,12 @@ namespace IngameScript
|
||||
|
||||
private const float TriggerLevel = 0.75F;
|
||||
|
||||
public AirZone(string zoneName, IConsoleProgram program)
|
||||
public AirZone(Program program, string zoneName)
|
||||
{
|
||||
Name = zoneName;
|
||||
_program = program;
|
||||
_console = new PrefixedConsole(program.Console, zoneName);
|
||||
_sequencer = new Sequencer(program, zoneName);
|
||||
_console = new PrefixedConsole(_program.Console, Name);
|
||||
_sequencer = new Sequencer(_program, Name);
|
||||
}
|
||||
|
||||
public void AddBlock(IMyTerminalBlock block)
|
||||
|
@ -72,7 +72,7 @@ namespace IngameScript
|
||||
{
|
||||
if (!_zones.ContainsKey(zone))
|
||||
{
|
||||
_zones[zone] = new AirZone(zone, this);
|
||||
_zones[zone] = new AirZone(this, zone);
|
||||
}
|
||||
_zones[zone].AddBlock(block);
|
||||
}
|
||||
|
Reference in New Issue
Block a user