Quantcast
Channel: Programming (In-game)
Viewing all articles
Browse latest Browse all 903

Strange behaviour when cycling through a list to apply action

$
0
0
Hello,

I made a small, barbaric script that's meant to put my ship in "minimum power" mode. I make a list of the names of the blocks I want to skip, exclude them from the list and then apply "OnOff" to the rest.

Code:
void Main(string argument)
{
	//rest of the Main function that does other things
	if (argument=="standby") 
	{
		List<IMyTerminalBlock> offblocks = new List<IMyTerminalBlock>();
		GridTerminalSystem.GetBlocksOfType<IMyFunctionalBlock>(offblocks);
		List<String> exceptions =...
Strange behaviour when cycling through a list to apply action

Viewing all articles
Browse latest Browse all 903

Trending Articles