void ParseResourceWindow(ConfigNode settings)
 {
     if (settings.HasNode("ResourceWindow"))
     {
         var node = settings.GetNode("ResourceWindow");
         ELResourceWindow.LoadSettings(node);
     }
 }
Beispiel #2
0
 void OnDestroy()
 {
     instance = null;
     GameEvents.onVesselChange.Remove(onVesselChange);
     GameEvents.onVesselWasModified.Remove(onVesselWasModified);
     GameEvents.onHideUI.Remove(onHideUI);
     GameEvents.onShowUI.Remove(onShowUI);
 }
 void OnDestroy()
 {
     instance = null;
     GameEvents.onVesselChange.Remove(onVesselChange);
     GameEvents.onVesselWasModified.Remove(onVesselWasModified);
     KAS.IKasEvents.OnLinkCreated.Remove(OnLinkCreated);
     KAS.IKasEvents.OnLinkBroken.Remove(OnLinkBroken);
     GameEvents.onHideUI.Remove(onHideUI);
     GameEvents.onShowUI.Remove(onShowUI);
 }
Beispiel #4
0
        void Awake()
        {
            instance = this;
            GameEvents.onVesselChange.Add(onVesselChange);
            GameEvents.onVesselWasModified.Add(onVesselWasModified);
            GameEvents.onHideUI.Add(onHideUI);
            GameEvents.onShowUI.Add(onShowUI);
            enabled = false;

            dstSets = new Dictionary <string, RMResourceSet> ();
            srcSets = new Dictionary <string, RMResourceSet> ();
        }
Beispiel #5
0
        public override void OnSave(ConfigNode config)
        {
            //Debug.Log (String.Format ("[EL] Settings save: {0}", config));
            var settings = new ConfigNode("Settings");

            config.AddNode(settings);

            settings.AddValue("UseKAC", use_KAC);
            settings.AddValue("KACAction", KACAction.ToString());
            settings.AddValue("PreferBlizzy", PreferBlizzy);

            ELShipInfo.SaveSettings(settings.AddNode("ShipInfo"));
            ELBuildWindow.SaveSettings(settings.AddNode("BuildWindow"));
            ELResourceWindow.SaveSettings(settings.AddNode("ResourceWindow"));
        }