From 3464e7eba68966e469a2976cd17feb744a056284 Mon Sep 17 00:00:00 2001 From: GER-Space Date: Mon, 17 Dec 2018 12:46:12 +0100 Subject: [PATCH] bugfif for release --- src/Core/LaunchSites/LaunchSiteManager.cs | 4 ++++ src/Modules/MapIcons/MapIconDraw.cs | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Core/LaunchSites/LaunchSiteManager.cs b/src/Core/LaunchSites/LaunchSiteManager.cs index 063c817c..2fe23549 100644 --- a/src/Core/LaunchSites/LaunchSiteManager.cs +++ b/src/Core/LaunchSites/LaunchSiteManager.cs @@ -293,6 +293,10 @@ internal static void CreateLaunchSite(StaticInstance instance, ConfigNode cfgNod instance.launchSite = mySite; RegisterLaunchSite(mySite); instance.groupCenter.launchsites.Add(mySite); + if (mySite.LaunchSiteIsHidden) + { + instance.groupCenter.hidden = true; + } } /// diff --git a/src/Modules/MapIcons/MapIconDraw.cs b/src/Modules/MapIcons/MapIconDraw.cs index a88571e9..26323e6f 100644 --- a/src/Modules/MapIcons/MapIconDraw.cs +++ b/src/Modules/MapIcons/MapIconDraw.cs @@ -149,7 +149,7 @@ public void drawTrackingStations() continue; } - if (groundStation.groupCenter.isHidden && !isOpen) + if (groundStation.groupCenter.isHidden && !isOpen || groundStation.groupCenter.isHidden && (((GroundStation)groundStation.myFacilities[0]).OpenCost == 0) ) { continue; } @@ -323,7 +323,7 @@ private void DrawSpaceCenters() continue; } - if (customSpaceCenter.staticInstance.groupCenter.isHidden && !cscIsOpen) + if ((customSpaceCenter.staticInstance.groupCenter != null) && (customSpaceCenter.staticInstance.groupCenter.isHidden && !cscIsOpen)) { continue; }