Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- resets the codes generated by the code generator
- */
- const string codeStorage = "[CODE]"; //the name of the text panel that saves the codeStorage
- void Main ()
- {
- //finds the codeStorage text panel
- var storageBlocks = new List<IMyTerminalBlock>();
- GridTerminalSystem.SearchBlocksOfName (codeStorage, storageBlocks);
- var storageList = new List <IMyTextPanel>();
- for(int i = 0; i < storageBlocks.Count; i++)
- {
- IMyTextPanel panel = storageBlocks[i] as IMyTextPanel;
- storageList.Add (panel);
- }
- //clears private and pubic text
- for(int i = 0; i < storageList.Count; i++)
- {
- storageList[i].WritePublicText("", false);
- storageList[i].WritePrivateText("", false);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment