public override void OnAwake() { base.OnAwake(); Instance = this; GameEvents.OnVesselRecoveryRequested.Add(OnVesselRecoveryRequested); if (HighLogic.LoadedSceneIsEditor) { EditorLogic.fetch.launchBtn.onClick.AddListener(new UnityEngine.Events.UnityAction(launchVessel)); } //Get the list of refinery resources refineryResourceMap = WBIRefineryResource.LoadRefineryResources(); if (refineryResourceMap.Keys.Count > 0) { refineryResources = refineryResourceMap.Values.ToArray(); } //Upgrade to max tier if needed if (HighLogic.CurrentGame.Mode != Game.Modes.CAREER && HighLogic.CurrentGame.Mode != Game.Modes.SCIENCE_SANDBOX) { foreach (WBIRefineryResource refineryResource in refineryResourceMap.Values) { refineryResource.UpgradeToMaxTier(); } } }
public override void SetVisible(bool newValue) { base.SetVisible(newValue); refinery = WBIRefinery.Instance; }