Skip to content

Commit

Permalink
Merge pull request #59 from Sigma88/Development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
Sigma88 authored Feb 13, 2018
2 parents a122870 + 4dce8c8 commit d57f50e
Show file tree
Hide file tree
Showing 22 changed files with 68 additions and 118 deletions.
7 changes: 7 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
**v0.9.7**

- Updated to Kopernicus 1.3.1-5
- Updated to Sigma LoadingScreens v0.3.3
- Fixed minor compatibility bug in scaling atmospheres


**v0.9.6**

- Fixed PQSCity altitude calculation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@
@addAFG ^= :L:l:
@addAFG ^= :S:s:
@addAFG ^= :E:e:

@enabled ^= :f:F:
@enabled ^= :A:a:
@enabled ^= :L:l:
@enabled ^= :S:s:
@enabled ^= :E:e:
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
@Body:HAS[@Template[Duna]:HAS[~removeAtmosphere[True]]]
{
%Atmosphere {}
@Atmosphere:HAS[~maxAltitude[*]]
{
maxAltitude = 50000
}
@Atmosphere
@Atmosphere:HAS[~enabled[False]]
{
&maxAltitude = 50000
&staticPressureASL = 6.755
&temperatureSeaLevel = 250

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
@Body:HAS[@Template[Eve]:HAS[~removeAtmosphere[True]]]
{
%Atmosphere {}
@Atmosphere:HAS[~maxAltitude[*]]
{
maxAltitude = 90000
}
@Atmosphere
@Atmosphere:HAS[~enabled[False]]
{
&maxAltitude = 90000
&staticPressureASL = 506.625
&temperatureSeaLevel = 408

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
@Body:HAS[@Template[Jool]:HAS[~removeAtmosphere[True]]]
{
%Atmosphere {}
@Atmosphere:HAS[~maxAltitude[*]]
{
maxAltitude = 200000
}
@Atmosphere
@Atmosphere:HAS[~enabled[False]]
{
&maxAltitude = 200000
&staticPressureASL = 1519.875
&temperatureSeaLevel = 200

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
@Body:HAS[@Template[Kerbin]:HAS[~removeAtmosphere[True]]]
{
%Atmosphere {}
@Atmosphere:HAS[~maxAltitude[*]]
{
maxAltitude = 70000
}
@Atmosphere
@Atmosphere:HAS[~enabled[False]]
{
&maxAltitude = 70000
&staticPressureASL = 101.324996948242
&temperatureSeaLevel = 287

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
@Body:HAS[@Template[Laythe]:HAS[~removeAtmosphere[True]]]
{
%Atmosphere {}
@Atmosphere:HAS[~maxAltitude[*]]
{
maxAltitude = 50000
}
@Atmosphere
@Atmosphere:HAS[~enabled[False]]
{
&maxAltitude = 50000
&staticPressureASL = 60.795
&temperatureSeaLevel = 282

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
@Body:HAS[@Template:HAS[#name[Sun],~removeAtmosphere[True]]]
{
@Atmosphere
@Atmosphere:HAS[~enabled[False]]
{
&maxAltitude = 600000
&staticPressureASL = 16
Expand Down Expand Up @@ -40,7 +40,7 @@
key = 600000 10000 0.06371323 0
}
}
@Atmosphere:HAS[~addAFG[False]]
@Atmosphere:HAS[~addAFG[False],~enabled[False]]
{
%AtmosphereFromGround
{
Expand Down
4 changes: 2 additions & 2 deletions GameData/Sigma/Dimensions/Configs/ReDimension/atmoScale.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
@Body,*
{
@Atmosphere
@Atmosphere:HAS[~enabled[False]]
{
@maxAltitude *= #$../SigmaDimensions/Atmosphere$
@altitude *= #$../SigmaDimensions/Atmosphere$
Expand Down Expand Up @@ -58,7 +58,7 @@
@key,* ^= : 0 0 0 x$: :
}
}
@Atmosphere:HAS[~addAFG[False]]
@Atmosphere:HAS[~addAFG[False],~enabled[False]]
{
@AtmosphereFromGround:HAS[#outerRadius[*]]
{
Expand Down
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": 6,
"PATCH": 7,
"BUILD": 0
},
"KSP_VERSION":
Expand Down
7 changes: 0 additions & 7 deletions GameData/Sigma/Dimensions/LoadingScreens/License.txt

This file was deleted.

16 changes: 0 additions & 16 deletions GameData/Sigma/Dimensions/LoadingScreens/README.md

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file modified GameData/Sigma/Dimensions/Plugins/SigmaDimensions.dll
Binary file not shown.
Binary file modified [Source]/Distribution/SigmaDimensions.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion [Source]/SigmaDimensions/AtmosphereTopLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ List<double[]> ReadCurve(FloatCurve curve)
foreach (string k in config.GetValues("key"))
{
value.SetFromString(k);
list.Add(value.value.ToArray());
list.Add(value.Value.ToArray());
}

return list;
Expand Down
24 changes: 12 additions & 12 deletions [Source]/SigmaDimensions/Compatibility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,31 +52,31 @@ public void ModuleManagerPostLoad()
if (customRescale != 1)
{
sunGlareFadeDistance *= customRescale;
if (flareSettings?.value?.Count > 2)
flareSettings.value[2] = flareSettings.value[2] / customRescale;
if (spikesSettings?.value?.Count > 2)
spikesSettings.value[2] = spikesSettings.value[2] / customRescale;
if (flareSettings?.Value?.Count > 2)
flareSettings.Value[2] = flareSettings.Value[2] / customRescale;
if (spikesSettings?.Value?.Count > 2)
spikesSettings.Value[2] = spikesSettings.Value[2] / customRescale;
}
else
{
sunGlareFadeDistance *= Rescale;
if (flareSettings?.value?.Count > 2)
flareSettings.value[2] = flareSettings.value[2] / Rescale;
if (spikesSettings?.value?.Count > 2)
spikesSettings.value[2] = spikesSettings.value[2] / Rescale;
if (flareSettings?.Value?.Count > 2)
flareSettings.Value[2] = flareSettings.Value[2] / Rescale;
if (spikesSettings?.Value?.Count > 2)
spikesSettings.Value[2] = spikesSettings.Value[2] / Rescale;
}

// Save Rescaled Scatterer Settings
if (flareSettings?.value?.Count > 2)
if (flareSettings?.Value?.Count > 2)
{
star.RemoveValues("flareSettings");
star.AddValue("flareSettings", string.Join(",", flareSettings.value.Select(p => p.ToString()).ToArray()));
star.AddValue("flareSettings", string.Join(",", flareSettings.Value.Select(p => p.ToString()).ToArray()));
}

if (spikesSettings?.value?.Count > 2)
if (spikesSettings?.Value?.Count > 2)
{
star.RemoveValues("spikesSettings");
star.AddValue("spikesSettings", string.Join(",", spikesSettings.value.Select(p => p.ToString()).ToArray()));
star.AddValue("spikesSettings", string.Join(",", spikesSettings.Value.Select(p => p.ToString()).ToArray()));
}

if (sunGlareFadeDistance != 0)
Expand Down
14 changes: 7 additions & 7 deletions [Source]/SigmaDimensions/PQSCityGroupsLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void Start()
foreach (ConfigNode GroupsLoader in GameDatabase.Instance.GetConfigNodes("PQSCity_Groups"))
{
AddGroups(GroupsLoader.GetNodes("GROUP"));
if (GroupsLoader.HasValue("debug") && !debugAllGroups.value)
if (GroupsLoader.HasValue("debug") && !debugAllGroups.Value)
debugAllGroups.SetFromString(GroupsLoader.GetValue("debug"));
}

Expand Down Expand Up @@ -98,7 +98,7 @@ void SaveGroups()

// If the Center position has not been found stop here
if (center == null) continue;
Debug.Log("PQSCityGroups.SaveGroups", " > 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 Down Expand Up @@ -180,21 +180,21 @@ void SaveGroups()
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("PQSCityGroups.SaveGroups", "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("PQSCityGroups.SaveGroups", "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("PQSCityGroups.SaveGroups", "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"))
body.Set("PQSCityGroupsMove", new Dictionary<Vector3, KeyValuePair<Vector3, NumericParser<double>[]>>());
var MoveList = body.Get<Dictionary<Vector3, KeyValuePair<Vector3, NumericParser<double>[]>>>("PQSCityGroupsMove");

if (!MoveList.ContainsKey(center.value))
MoveList.Add(center.value, info);
if (!MoveList.ContainsKey(center.Value))
MoveList.Add(center.Value, info);

body.Set("PQSCityGroupsMove", MoveList);
}
Expand Down
16 changes: 8 additions & 8 deletions [Source]/SigmaDimensions/PQSMod_SigmaDimensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,63 +29,63 @@ public override void OnVertexBuildHeight(PQS.VertexBuildData data)
public class SigmaDimensions : ModLoader<PQSMod_SigmaDimensions>, IParserEventSubscriber
{
// Resize
[ParserTarget("Resize", optional = true)]
[ParserTarget("Resize", Optional = true)]
private NumericParser<double> Resize
{
get { return mod.Resize; }
set { mod.Resize = value; }
}

// Atmosphere
[ParserTarget("Atmosphere", optional = true)]
[ParserTarget("Atmosphere", Optional = true)]
private NumericParser<float> Atmosphere
{
get { return mod.Atmosphere; }
set { mod.Atmosphere = value; }
}

// landscape
[ParserTarget("landscape", optional = true)]
[ParserTarget("landscape", Optional = true)]
private NumericParser<double> landscape
{
get { return mod.landscape; }
set { mod.landscape = value; }
}

// changeScatterSize
[ParserTarget("changeScatterSize", optional = true)]
[ParserTarget("changeScatterSize", Optional = true)]
private NumericParser<float> changeScatterSize
{
get { return mod.changeScatterSize; }
set { mod.changeScatterSize = value; }
}

// changeScatterDensity
[ParserTarget("changeScatterDensity", optional = true)]
[ParserTarget("changeScatterDensity", Optional = true)]
private NumericParser<float> changeScatterDensity
{
get { return mod.changeScatterDensity; }
set { mod.changeScatterDensity = value; }
}

// Resize
[ParserTarget("resizeBuildings", optional = true)]
[ParserTarget("resizeBuildings", Optional = true)]
private NumericParser<double> resizeBuildings
{
get { return mod.resizeBuildings; }
set { mod.resizeBuildings = value; }
}

// groundTiling
[ParserTarget("groundTiling", optional = true)]
[ParserTarget("groundTiling", Optional = true)]
private NumericParser<double> groundTiling
{
get { return mod.groundTiling; }
set { mod.groundTiling = value; }
}

// atmoTopLayer
[ParserTarget("atmoTopLayer", optional = true)]
[ParserTarget("atmoTopLayer", Optional = true)]
private NumericParser<float> atmoTopLayer
{
get { return mod.atmoTopLayer; }
Expand Down
Loading

0 comments on commit d57f50e

Please sign in to comment.