Created
April 16, 2019 19:57
-
-
Save siasur/e799a3b895f92db51ee7d180f13ae7fe to your computer and use it in GitHub Desktop.
Grundgerüst für ein SE Script...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Main(string argument) | |
{ | |
var groups = new List<IMyBlockGroup>(); | |
GridTerminalSystem.GetBlockGroups(groups, selector => selector.Name.EndsWith("#Battery")); | |
foreach (var g in groups) | |
{ | |
List<IMyReactor> reactors = new List<IMyReactor>(); | |
g.GetBlocksOfType(reactors); | |
List<IMyBatteryBlock> batteries = new List<IMyBatteryBlock>(); | |
g.GetBlocksOfType(batteries); | |
foreach (var reactor in reactors) | |
{ | |
// Durchlaufen der Reaktoren | |
} | |
foreach (var battery in batteries) | |
{ | |
// Durchlaufen der Batterien | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment