protected new void ResetNetwork()
        {
            Lib.Verbose("CommNet Network rebooted");

            CommNet = new KCommNetwork();
            GameEvents.CommNet.OnNetworkInitialized.Fire();
        }
예제 #2
0
 public static Vessel FindCorrespondingVessel(CommNode commNode)
 {
     foreach (var a in commVessels)
     {
         if (KCommNetwork.AreSame(a.Value.Comm, commNode))
         {
             return(a.Value.Vessel);
         }
     }
     return(null);
 }
        protected override void Awake()
        {
            Lib.Verbose("CommNet Network booting");

            CommNetNetwork.Instance = this;
            CommNet = new KCommNetwork();

            if (HighLogic.LoadedScene == GameScenes.TRACKSTATION)
            {
                GameEvents.onPlanetariumTargetChanged.Add(new EventData <MapObject> .OnEvent(OnMapFocusChange));
            }

            GameEvents.OnGameSettingsApplied.Add(new EventVoid.OnEvent(ResetNetwork));
            ResetNetwork(); // Please retain this so that KSP can properly reset
        }
예제 #4
0
 public static KCommNetHome FindCorrespondingGroundStation(CommNode commNode)
 {
     return(groundStations.Find(x => KCommNetwork.AreSame(x.commNode, commNode)));
 }