Skip to content

Instantly share code, notes, and snippets.

@awstanley
Created January 6, 2015 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save awstanley/65f5b66e1064d3826239 to your computer and use it in GitHub Desktop.
Save awstanley/65f5b66e1064d3826239 to your computer and use it in GitHub Desktop.
Space Engineers script to get information from the block (CSV, but you need to parse it out)
void Main()
{
for (int block = 0; block < GridTerminalSystem.Blocks.Count; block++)
{
if (GridTerminalSystem.Blocks[block] is IMyTerminalBlock)
{
IMyTerminalBlock Block = GridTerminalSystem.Blocks[block];
StringBuilder Str = new StringBuilder(); Str.Append(Block.BlockDefinition.ToString());
Str.Append("[" + Block.DetailedInfo + "] ");
Block.SetCustomName(Str);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment