protected new void ResetNetwork() { Lib.Verbose("CommNet Network rebooted"); CommNet = new KCommNetwork(); GameEvents.CommNet.OnNetworkInitialized.Fire(); }
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 }
public static KCommNetHome FindCorrespondingGroundStation(CommNode commNode) { return(groundStations.Find(x => KCommNetwork.AreSame(x.commNode, commNode))); }