Skip to content

Commit

Permalink
Kill the launch sites WITH FIRE
Browse files Browse the repository at this point in the history
StollD committed May 6, 2018
1 parent 2b16c6a commit bd57982
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Kopernicus/Configuration/Loader.cs
Original file line number Diff line number Diff line change
@@ -155,8 +155,10 @@ public NumericParser<Double> scaledSpaceFaderMult
// Remove Launch Sites added by DLCs
// * Island_Airfield
// * Woomerang_Launch_Site
// * Woomerang_GroundObjects
// * Desert_Launch_Site
// * Desert_Airfield
// * Desert_GroundObjects
[ParserTargetCollection("self", Key = "removeLaunchSites", AllowMerge = false, NameSignificance = NameSignificance.Key)]
public List<StringCollectionParser> removeLaunchSites
{
11 changes: 11 additions & 0 deletions src/Kopernicus/RuntimeUtility/RuntimeUtility.cs
Original file line number Diff line number Diff line change
@@ -254,12 +254,23 @@ void Start()

if (ExpansionsLoader.IsExpansionInstalled("MakingHistory"))
{
PQSCity2[] cities = FindObjectsOfType<PQSCity2>();
foreach (String site in Templates.RemoveLaunchSites)
{
// Remove the launch site from the list if it exists
if (PSystemSetup.Instance.LaunchSites.Any(s => s.name == site))
{
PSystemSetup.Instance.RemoveLaunchSite(site);
}

PQSCity2 city = cities.FirstOrDefault(c =>
c.gameObject.name == site || c.gameObject.name == site + "(Clone)");

// Kill the PQSCity if it exists
if (city != null)
{
Destroy(city.gameObject);
}
}
}
#if FALSE

0 comments on commit bd57982

Please sign in to comment.