public void Main(string argument, UpdateType updateSource) { DummyTube = new TorpedoTube(1, new TorpedoSubsystem(null)); DummyTube.LoadedTorpedo = new Torpedo(); if (argument == "ALL") { GetParts(true); } else if (argument == "HUMMINGBIRD") { GetPartsHummingbird(); } else if (argument == "LANDPEDO") { GetPartsLandpedo(); } else { GetParts(); } if (argument == "LOAD") { List <IMyTerminalBlock> b = new List <IMyTerminalBlock>(); GridTerminalHelper.Base64BytePosToBlockList(Base.CustomData, Base, ref b); Echo(b.Count().ToString()); } else { string output; if (CheckTorpedo(DummyTube.LoadedTorpedo, out output)) { Me.GetSurface(0).ContentType = ContentType.TEXT_AND_IMAGE; Me.GetSurface(0).FontSize = 10; Me.GetSurface(0).FontColor = Color.Green; Me.GetSurface(0).WriteText("AOK"); SaveTorpedo(); } else { Me.GetSurface(0).ContentType = ContentType.TEXT_AND_IMAGE; Me.GetSurface(0).FontSize = 10; Me.GetSurface(0).FontColor = Color.Red; Me.GetSurface(0).WriteText("ERR"); } Echo(output); } DummyTube = null; PartsOfInterest.Clear(); Base = null; }
public IMyTerminalBlock Base; // Merge OR Sprue Hinge OR Thruster public ProxyTube(MyGridProgram context) { Context = context; DummyTube = new TorpedoTube(1, new TorpedoSubsystem(null)); DummyTube.LoadedTorpedo = new Torpedo(); }