Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Kopernicus/Kopernicus
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c66f8c8c22b4
Choose a base ref
...
head repository: Kopernicus/Kopernicus
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0f07ee18d31d
Choose a head ref
  • 4 commits
  • 5 files changed
  • 1 contributor

Commits on May 2, 2018

  1. Try to fix the FPS issues

    StollD committed May 2, 2018
    Copy the full SHA
    54d4c81 View commit details
  2. Remove DLC launch sites

    StollD committed May 2, 2018
    4
    Copy the full SHA
    7bbbaa0 View commit details
  3. Fix #289

    StollD committed May 2, 2018
    Copy the full SHA
    21345f2 View commit details
  4. Update config-parser

    StollD committed May 2, 2018
    Copy the full SHA
    0f07ee1 View commit details
4 changes: 4 additions & 0 deletions src/Kopernicus.Components/NameChanger.cs
Original file line number Diff line number Diff line change
@@ -47,8 +47,12 @@ public void Start()
{
foreach (CelestialBody b in FlightGlobals.Bodies.Where(b => b.bodyName == oldName))
{
OrbitRendererData data = PSystemManager.OrbitRendererDataCache[b];
PSystemManager.OrbitRendererDataCache.Remove(b);
b.bodyName = newName;
PlanetariumCamera.fetch.targets.Find(t => t.name == oldName).name = newName;
data.cb = b;
PSystemManager.OrbitRendererDataCache.Add(b, data);
Events.OnApplyNameChange.Fire(this, b);
}
}
12 changes: 12 additions & 0 deletions src/Kopernicus/Configuration/Loader.cs
Original file line number Diff line number Diff line change
@@ -151,6 +151,18 @@ public NumericParser<Double> scaledSpaceFaderMult
get { return ScaledSpaceFader.faderMult; }
set { ScaledSpaceFader.faderMult = value; }
}

// Remove Launch Sites added by DLCs
// * Island_Airfield
// * Woomerang_Launch_Site
// * Desert_Launch_Site
// * Desert_Airfield
[ParserTargetCollection("self", Key = "removeLaunchSites", AllowMerge = false, NameSignificance = NameSignificance.Key)]
public List<StringCollectionParser> removeLaunchSites
{
get { return new List<StringCollectionParser> { new StringCollectionParser(Templates.RemoveLaunchSites)}; }
set { Templates.RemoveLaunchSites = value.SelectMany(v => v.Value).ToList(); }
}

// Instance
public Loader()
18 changes: 16 additions & 2 deletions src/Kopernicus/RuntimeUtility/RuntimeUtility.cs
Original file line number Diff line number Diff line change
@@ -35,6 +35,7 @@
using System.IO;
using System.Linq;
using System.Reflection;
using Expansions;
using Kopernicus.OnDemand;
using KSP.UI.Screens.Settings.Controls;
using UnityEngine;
@@ -249,6 +250,14 @@ void Start()
fixes[b.transform.name].Key.orbitingBodies.Add(b);
fixes[b.transform.name].Key.orbitingBodies = fixes[b.transform.name].Key.orbitingBodies.OrderBy(cb => cb.orbit.semiMajorAxis).ToList();
}

if (ExpansionsLoader.IsExpansionInstalled("MakingHistory"))
{
foreach (String site in Templates.RemoveLaunchSites)
{
PSystemSetup.Instance.RemoveLaunchSite(site);
}
}
#if FALSE
// AFG-Ception
foreach (CelestialBody body in PSystemManager.Instance.localBodies)
@@ -288,6 +297,11 @@ void Start()
/// </summary>
private FieldInfo[] fields;

/// <summary>
/// All display names for the terrain detail
/// </summary>
private String[] _details;

// Stuff
void LateUpdate()
{
@@ -351,10 +365,10 @@ void LateUpdate()
}

// Update the names of the presets in the settings dialog
foreach (SettingsTerrainDetail detail in Resources.FindObjectsOfTypeAll<SettingsTerrainDetail>())
foreach (SettingsTerrainDetail detail in FindObjectsOfType<SettingsTerrainDetail>())
{
detail.displayStringValue = true;
detail.stringValues = Templates.PresetDisplayNames.ToArray();
detail.stringValues = _details ?? (_details = Templates.PresetDisplayNames.ToArray());
}
}

6 changes: 6 additions & 0 deletions src/Kopernicus/Templates.cs
Original file line number Diff line number Diff line change
@@ -58,6 +58,9 @@ public class Templates
// The localized names of the presets
public static List<String> PresetDisplayNames { get; set; }

// The launch sites that should get removed
public static List<String> RemoveLaunchSites { get; set; }

// Initialisation
static Templates()
{
@@ -80,6 +83,9 @@ static Templates()
Localizer.Format("#autoLOC_6001507"),
Localizer.Format("#autoLOC_6001508")
};

// Launch Sites
RemoveLaunchSites = new List<String>();
}
}
}
2 changes: 1 addition & 1 deletion src/external/config-parser
Submodule config-parser updated 1 files
+2 −2 src/Parser.cs