public ProceduralModuleDeclaration(ComModule statics, Declaration parent, QualifiedModuleName module, Attributes attributes) : this( module.QualifyMemberName(statics.Name), parent, statics.Name, false, new List <IAnnotation>(), attributes) { IsPrivateModule = statics.IsRestricted; }
//NO INPUT (FS) public Program() { antenna = GridTerminalSystem.GetBlockWithName(ANTENNA_NAME) as IMyRadioAntenna; if (antenna != null) { output = GridTerminalSystem.GetBlockWithName(OUTPUT_NAME); try { IMyTextPanel textPanel = output as IMyTextPanel; textPanel.WritePublicText(""); outputIsTextPanel = true; } catch (Exception) { outputIsTextPanel = false; } //TODO assign antenna to pb in script (even possible?) isWorking = true; antenna.SetValueFloat("Radius", RANGE); switch (ACCEPT_MESSAGE) { case 0: antenna.IgnoreOtherBroadcast = false; antenna.IgnoreAlliedBroadcast = false; break; case 1: antenna.IgnoreOtherBroadcast = true; antenna.IgnoreAlliedBroadcast = false; break; case 2: antenna.IgnoreOtherBroadcast = true; antenna.IgnoreAlliedBroadcast = true; break; default: antenna.IgnoreOtherBroadcast = true; antenna.IgnoreAlliedBroadcast = false; break; } if (ALWAYS_ON) { antenna.SetValue("EnableBroadCast", true); } else { antenna.SetValue("EnableBroadCast", false); } } else { Echo("Antenna could not be found"); isWorking = false; return; } if (CHAT_MODE) { chathandler = new ChatHandler(this, CHAT_NAME); } if (OWN_NAME == "") { OWN_NAME = Me.CubeGrid.CustomName; } OWN_NAME = OWN_NAME + "/" + Me.EntityId % 10000; comHandler = new ComModule(this, antenna, OWN_NAME, ALWAYS_ON); Me.CustomName = "PB-COM-" + OWN_NAME; Me.CustomData = ""; }