Ejemplo n.º 1
0
 protected override void Awake()
 {
     if (HighLogic.LoadedScene != GameScenes.SPACECENTER)
     {
         QDebug.Warning("The RnD search function works only on the SpaceCenter. Destroy.", "QRnD");
         Destroy(this);
         return;
     }
     QStock.ResetScenes();
     if (HighLogic.CurrentGame.Mode != Game.Modes.CAREER && HighLogic.CurrentGame.Mode != Game.Modes.SCIENCE_SANDBOX)
     {
         QDebug.Warning("The RnD search function works only on a Career or on a Science gamemode. Destroy.", "QRnD");
         Destroy(this);
         return;
     }
     if (Instance != null)
     {
         QDebug.Warning("There's already an Instance of " + MOD + ". Destroy.", "QRnD");
         Destroy(this);
         return;
     }
     Instance = this;
     if (!QSettings.Instance.RnDSearch)
     {
         QDebug.Warning("The RnD search function is disabled. Destroy.", "QRnD");
         Destroy(this);
         return;
     }
     base.Awake();
     QDebug.Log("Awake", "QRnD");
 }
Ejemplo n.º 2
0
 protected override void Awake()
 {
     if (HighLogic.LoadedScene != GameScenes.SPACECENTER) {
         Warning ("The RnD search function works only on the SpaceCenter. Destroy.", "QRnD");
         Destroy (this);
         return;
     }
     QStockToolbar.ResetScenes ();
     if (HighLogic.CurrentGame.Mode != Game.Modes.CAREER && HighLogic.CurrentGame.Mode != Game.Modes.SCIENCE_SANDBOX) {
         Warning ("The RnD search function works only on a Career or on a Science gamemode. Destroy.", "QRnD");
         Destroy (this);
         return;
     }
     if (Instance != null) {
         Warning ("There's already an Instance of " + MOD +". Destroy.", "QRnD");
         Destroy (this);
         return;
     }
     Instance = this;
     QSettings.Instance.Load ();
     if (!QSettings.Instance.RnDSearch) {
         Warning ("The RnD search function is disabled. Destroy.", "QRnD");
         Destroy (this);
         return;
     }
     base.Awake ();
     Log ("Awake", "QRnD");
 }