Exemplo n.º 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;
    }
Exemplo n.º 2
0
 public void UpdateFromGrid() => GTS.GetBlocksOfType <IMySolarPanel>(_panels, solarPanel => _rotors.Count(rotor => rotor.GetRotor() != null && solarPanel.CubeGrid == rotor.GetRotor().TopGrid) > 0);
Exemplo n.º 3
0
 public void UpdateFromGrid() => GTS.GetBlocksOfType <IMyBatteryBlock>(_batteries, _filter);