Beispiel #1
0
    public ProgBlock() : base()
    {
        List <IMyTerminalBlock> pbs = new List <IMyTerminalBlock>();

        GTS.GetBlocksOfType <IMyProgrammableBlock>(pbs, (block) => (block as IMyProgrammableBlock).IsRunning);
        block = pbs.Count == 1 ? pbs[0] as IMyProgrammableBlock : null;
    }
Beispiel #2
0
 public void UpdateFromGrid() => GTS.GetBlocksOfType <IMySolarPanel>(_panels, solarPanel => _rotors.Count(rotor => rotor.GetRotor() != null && solarPanel.CubeGrid == rotor.GetRotor().TopGrid) > 0);
 public void UpdateFromGrid() => GTS.GetBlocksOfType <IMyBatteryBlock>(_batteries, _filter);