Skip to content

Commit

Permalink
v0.9.3 (#52)
Browse files Browse the repository at this point in the history
* lightRange

* lightRange

* readmes

* rescaleAntennas

* scatterer compatibility

* try to avoid errors

* try to avoid more errors

* resize spacecenter

* other spacecenter fixes

* only adjust radius

* fix scatterer compatibility

* plugin version and recompile

* changelog and version

* resize clouds and scatterer

* ksc switcher

* plugin version update

* changelog and version

* hotfix

* pqscity groups fix

* changelog

* DSN rescale

* reposition launchsites

* recompile

* changelog and version

* hotfix

* don't use cbnamelater

* fix scalebyradius

* case sensitivity

* move cfgs around

* oceans have pqs as well

* version

* debug logger

* changes to resize

* license

* debugs and usings

* plugins

* changelog and version
  • Loading branch information
Sigma88 authored Sep 28, 2017
1 parent 4ae9262 commit 44a9750
Show file tree
Hide file tree
Showing 42 changed files with 172 additions and 133 deletions.
11 changes: 11 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
**v0.9.3**

- Updated to Kopernicus 1.3.0-8
- Added Sigma88LoadingScreens plugin
- Reorganized internal folder structure
- Improved debugging tools
- Fixed resize of Ocean's PQS sphere
- Fixed resize of PQSMods that use 'scaleDeformityByRadius'
- PQSCityGroups now use 'name' instead of 'cbNameLater'


**v0.9.2**

- Fixed scatterer compatibility
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,51 +12,29 @@
@removeAtmosphere ^= :R:r:
@removeAtmosphere ^= :U:u:
@removeAtmosphere ^= :E:e:
}
@Properties
{
@tidallyLocked ^= :t:T:
@tidallyLocked ^= :R:r:
@tidallyLocked ^= :U:u:
@tidallyLocked ^= :E:e:

@removeOcean ^= :t:T:
@removeOcean ^= :R:r:
@removeOcean ^= :U:u:
@removeOcean ^= :E:e:
}
@Atmosphere
{
@pressureCurveIsNormalized ^= :t:T:
@pressureCurveIsNormalized ^= :R:r:
@pressureCurveIsNormalized ^= :U:u:
@pressureCurveIsNormalized ^= :E:e:

@temperatureCurveIsNormalized ^= :t:T:
@temperatureCurveIsNormalized ^= :R:r:
@temperatureCurveIsNormalized ^= :U:u:
@temperatureCurveIsNormalized ^= :E:e:

@addAFG ^= :f:F:
@addAFG ^= :A:a:
@addAFG ^= :L:l:
@addAFG ^= :S:s:
@addAFG ^= :E:e:
}
@PQS
{
@Mods
{
@VertexHeightMap,*
{
@ignorelandscape ^= :t:T:
@ignorelandscape ^= :R:r:
@ignorelandscape ^= :U:u:
@ignorelandscape ^= :E:e:
}
@VertexHeightOblate,*
{
@ignorelandscape ^= :t:T:
@ignorelandscape ^= :R:r:
@ignorelandscape ^= :U:u:
@ignorelandscape ^= :E:e:
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@Kopernicus:FOR[SigDim]
{
@Body:HAS[@Template[Eve]:HAS[~removeOcean[True]]]
{
%Ocean {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@Kopernicus:FOR[SigDim]
{
@Body:HAS[@Template[Kerbin]:HAS[~removeOcean[True]]]
{
%Ocean {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@Kopernicus:FOR[SigDim]
{
@Body:HAS[@Template[Laythe]:HAS[~removeOcean[True]]]
{
%Ocean {}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,12 @@
#../../SigmaDimensions {}
}
}
@Ocean
{
%Mods
{
#../../SigmaDimensions {}
}
}
}
}
2 changes: 1 addition & 1 deletion GameData/Sigma/Dimensions/Configs/Sigma-Dimensions.version
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{
"MAJOR": 0,
"MINOR": 9,
"PATCH": 2,
"PATCH": 3,
"BUILD": 0
},
"KSP_VERSION":
Expand Down
Binary file not shown.
Binary file modified GameData/Sigma/Dimensions/Plugins/SigmaDimensions.dll
Binary file not shown.
8 changes: 7 additions & 1 deletion License.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,10 @@ All Rights Reserved


For more info visit the KSP Forum Thread:
http://forum.kerbalspaceprogram.com/index.php?/topic/126548-0
http://forum.kerbalspaceprogram.com/index.php?/topic/126548-0



Includes the Sigma88LoadingScreens plugin.
License: All Rights Reserved
Source: https://github.com/Sigma88/Sigma-LoadingScreens
Binary file modified [Source]/Distribution/SigmaDimensions.dll
Binary file not shown.
8 changes: 4 additions & 4 deletions [Source]/SigmaDimensions/AtmosphereTopLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void QuickFix(FloatCurve curve, double topLayer)
{
if (topLayer > curve.maxTime)
{
List<double[]> list = ReadCurve(curve); /* Avoid Bad Curves ==> */ if (list.Count == 0) { UnityEngine.Debug.Log("SigmaLog: This curve is pointless."); return; }
List<double[]> list = ReadCurve(curve); /* Avoid Bad Curves ==> */ if (list.Count == 0) { Debug.Log("AtmosphereTopLayer.QuickFix", "This curve is pointless."); return; }
list.Last()[3] = 0;
list.Add(new double[] { topLayer, list.Last()[1], 0, 0 });
curve.Load(WriteCurve(list));
Expand Down Expand Up @@ -312,7 +312,7 @@ enum Ktype

void PrintCurve(CelestialBody body, string name)
{
Debug.Log(name + " for body " + body.name);
Debug.Log("AtmosphereTopLayer.PrintCurve", name + " for body " + body.name);
PrintCurve(body.atmospherePressureCurve, "pressureCurve");
PrintCurve(body.atmosphereTemperatureCurve, "temperatureCurve");
PrintCurve(body.atmosphereTemperatureSunMultCurve, "temperatureSunMultCurve");
Expand All @@ -334,10 +334,10 @@ void PrintCurve(FloatCurve curve, string name)
{
ConfigNode config = new ConfigNode();
curve.Save(config);
Debug.Log(name);
Debug.Log("AtmosphereTopLayer.PrintCurve", name);
foreach (string key in config.GetValues("key"))
{
Debug.Log("key = " + key);
Debug.Log("AtmosphereTopLayer.PrintCurve", "key = " + key);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions [Source]/SigmaDimensions/NodeRemover.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using UnityEngine;
using System.Linq;
using System.Linq;
using UnityEngine;


namespace SigmaDimensionsPlugin
Expand Down
38 changes: 19 additions & 19 deletions [Source]/SigmaDimensions/PQSCityGroupsLoader.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Linq;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using Kopernicus;

Expand Down Expand Up @@ -60,11 +60,11 @@ void SaveGroups()
}

string group = Group.GetValue("name");
CelestialBody body = FlightGlobals.Bodies.First(b => b.name == Group.GetValue("body"));
CelestialBody body = FlightGlobals.Bodies.FirstOrDefault(b => b.transform.name == Group.GetValue("body"));
if (string.IsNullOrEmpty(group) || body == null) continue;
Debug.Log(">>> Sigma Dimensions Log: PQSCityGroupsLoader <<<");
Debug.Log("> Planet: " + body.name + (body.name != body.displayName.Replace("^N", "") ? (", (A.K.A.: " + body.displayName.Replace("^N", "") + ")") : "") + (body.name != body.transform.name ? (", (A.K.A.: " + body.transform.name + ")") : ""));
Debug.Log(" > Group: " + group);
Debug.Log("PQSCityGroups.SaveGroups", ">>> Loading PQSCityGroups from config files <<<");
Debug.Log("PQSCityGroups.SaveGroups", "> Planet: " + body.name + (body.name != body.displayName.Replace("^N", "") ? (", (A.K.A.: " + body.displayName.Replace("^N", "") + ")") : "") + (body.name != body.transform.name ? (", (A.K.A.: " + body.transform.name + ")") : ""));
Debug.Log("PQSCityGroups.SaveGroups", " > Group: " + group);


// FIND GROUP CENTER
Expand Down Expand Up @@ -112,7 +112,7 @@ void SaveGroups()
// If the Center position has not been found stop here
if (center == null) continue;
if (Debug.debug && !debug.Contains(center)) debug.Add(center);
Debug.Log(" > Center position = " + center.value + ", (LAT: " + new SigmaDimensions.LatLon(center).lat + ", LON: " + new SigmaDimensions.LatLon(center).lon + ")");
Debug.Log("PQSCityGroups.SaveGroups", " > Center position = " + center.value + ", (LAT: " + new SigmaDimensions.LatLon(center).lat + ", LON: " + new SigmaDimensions.LatLon(center).lon + ")");


// ADD PQS MODS TO THE GROUP
Expand All @@ -131,7 +131,7 @@ void SaveGroups()
if (PQSList.ContainsKey(mod)) PQSList.Remove(mod);

PQSList.Add(mod, center);
Debug.Log(" > PQSCity: " + mod.name);
Debug.Log("PQSCityGroups.SaveGroups", " > PQSCity: " + mod.name);
}
}
foreach (string city2 in M.GetValues("PQSCity2"))
Expand All @@ -145,7 +145,7 @@ void SaveGroups()
if (PQSList.ContainsKey(mod)) PQSList.Remove(mod);

PQSList.Add(mod, center);
Debug.Log(" > PQSCity2: " + mod.name);
Debug.Log("PQSCityGroups.SaveGroups", " > PQSCity2: " + mod.name);
}
}
}
Expand All @@ -165,7 +165,7 @@ void SaveGroups()
if (PQSList.ContainsKey(mod)) continue;

PQSList.Add(mod, center);
Debug.Log(" > external: " + mod);
Debug.Log("PQSCityGroups.SaveGroups", " > external: " + mod);
}
ExternalGroups[body].Remove(group);
}
Expand All @@ -188,19 +188,19 @@ void SaveGroups()
Vector3? newCenter = GetCenter(C2, body);

if (newCenter == null) newCenter = center;
Debug.Log("Move Group to position = " + newCenter.Value + ", (LAT: " + new SigmaDimensions.LatLon(newCenter.Value).lat + ", LON: " + new SigmaDimensions.LatLon(newCenter.Value).lon + ")");
Debug.Log("PQSCityGroups.SaveGroups", "Move Group to position = " + newCenter.Value + ", (LAT: " + new SigmaDimensions.LatLon(newCenter.Value).lat + ", LON: " + new SigmaDimensions.LatLon(newCenter.Value).lon + ")");


var info = new KeyValuePair<Vector3, NumericParser<double>[]>((Vector3)newCenter, new[] { 0, 0, new NumericParser<double>() });

if (C2.HasValue("Rotate"))
info.Value[0].SetFromString(C2.GetValue("Rotate")); Debug.Log("Rotate group = " + info.Value[0].value);
info.Value[0].SetFromString(C2.GetValue("Rotate")); Debug.Log("PQSCityGroups.SaveGroups", "Rotate group = " + info.Value[0].value);
if (C2.HasValue("fixAltitude"))
info.Value[1].SetFromString(C2.GetValue("fixAltitude")); Debug.Log("Fix group altitude = " + info.Value[1].value);
info.Value[1].SetFromString(C2.GetValue("fixAltitude")); Debug.Log("PQSCityGroups.SaveGroups", "Fix group altitude = " + info.Value[1].value);
if (C2.HasValue("originalAltitude"))
info.Value[2].SetFromString(C2.GetValue("originalAltitude"));
else
info.Value[2].SetFromString("-Infinity"); Debug.Log("Original group altitude = " + (info.Value[2].value == double.NegativeInfinity ? "[Not Specified]" : info.Value[2].value.ToString()));
info.Value[2].SetFromString("-Infinity"); Debug.Log("PQSCityGroups.SaveGroups", "Original group altitude = " + (info.Value[2].value == double.NegativeInfinity ? "[Not Specified]" : info.Value[2].value.ToString()));


if (!body.Has("PQSCityGroupsMove"))
Expand All @@ -220,21 +220,21 @@ void SaveGroups()

// LOAD REMAINING EXTERNAL GROUPS
Debug.debug = (debugAllGroups?.value == true);
Debug.Log(">>> Sigma Dimensions Log: ExternalGroupsLoader <<<");
Debug.Log("PQSCityGroups.SaveGroups", ">>> Loading external PQSCityGroups <<<");
foreach (CelestialBody planet in ExternalGroups.Keys.Where(p => p != null && ExternalGroups[p] != null))
{
Debug.Log("> Planet: " + planet.name + (planet.name != planet.displayName.Replace("^N", "") ? (", (A.K.A.: " + planet.displayName.Replace("^N", "") + ")") : "") + (planet.name != planet.transform.name ? (", (A.K.A.: " + planet.transform.name + ")") : ""));
Debug.Log("PQSCityGroups.SaveGroups", "> Planet: " + planet.name + (planet.name != planet.displayName.Replace("^N", "") ? (", (A.K.A.: " + planet.displayName.Replace("^N", "") + ")") : "") + (planet.name != planet.transform.name ? (", (A.K.A.: " + planet.transform.name + ")") : ""));
foreach (string group in ExternalGroups[planet].Keys.Where(g => !string.IsNullOrEmpty(g) && ExternalGroups[planet][g] != null))
{
if (ExternalGroups[planet][group].Count == 0) continue;
Debug.Log(" > Group: " + group);
Debug.Log("PQSCityGroups.SaveGroups", " > Group: " + group);

// Since these groups are new they don't have a center
// Define the center as the position of the first mod in the array
Vector3? center = null;
center = GetPosition(ExternalGroups[planet][group].FirstOrDefault());
if (center == null) continue;
Debug.Log(" > Center position = " + center + ", (LAT: " + new SigmaDimensions.LatLon((Vector3)center).lat + ", LON: " + new SigmaDimensions.LatLon((Vector3)center).lon + ")");
Debug.Log("PQSCityGroups.SaveGroups", " > Center position = " + center + ", (LAT: " + new SigmaDimensions.LatLon((Vector3)center).lat + ", LON: " + new SigmaDimensions.LatLon((Vector3)center).lon + ")");

if (!planet.Has("PQSCityGroups"))
planet.Set("PQSCityGroups", new Dictionary<object, Vector3>());
Expand All @@ -245,7 +245,7 @@ void SaveGroups()
if (!PQSList.ContainsKey(mod))
{
PQSList.Add(mod, (Vector3)center);
Debug.Log(" > external: " + mod);
Debug.Log("PQSCityGroups.SaveGroups", " > external: " + mod);
}
}

Expand Down
Loading

0 comments on commit 44a9750

Please sign in to comment.