Beispiel #1
0
        public override void OnLoad(ConfigNode node)
        {
            try
            {
                base.OnLoad(node);
                lastUpdateTime = Utilities.GetValue(node, "lastUpdateTime", lastUpdateTime);
                part.force_activate();

                Events["StartResourceConverter"].guiName        = StartActionName;
                Events["StopResourceConverter"].guiName         = StopActionName;
                Actions["StartResourceConverterAction"].guiName = StartActionName;
                Actions["StopResourceConverterAction"].guiName  = StopActionName;
                Fields["status"].guiName = ConverterName;

                //Check for presence of an Animation Group.  If not present, enable the module.
                if (!part.Modules.Contains("USI_ModuleAnimationGroup"))
                {
                    EnableModule();
                }

                MonoUtilities.RefreshContextWindows(part);
            }
            catch (Exception e)
            {
                print("[REGO] - Error in - BaseConverter_OnLoad - " + e.Message);
            }
        }
Beispiel #2
0
 protected void UpdateConverterStatus()
 {
     if (DirtyFlag != IsActivated)
     {
         DirtyFlag = IsActivated;
         Events["StartResourceConverter"].active = !IsActivated;
         Events["StopResourceConverter"].active  = IsActivated;
         status = "Operational";
         MonoUtilities.RefreshContextWindows(part);
     }
 }