Skip to content

Commit

Permalink
Merge pull request #80 from Sigma88/Development
Browse files Browse the repository at this point in the history
update to 1.7.1
  • Loading branch information
Sigma88 committed Jun 8, 2019
2 parents fee2538 + c953dae commit f62e121
Show file tree
Hide file tree
Showing 29 changed files with 90 additions and 33 deletions.
10 changes: 10 additions & 0 deletions Changelog.txt
@@ -1,3 +1,13 @@
**v0.10.3**

- Updated to KSP 1.7.1 and Kopernicus 1.7.1-4


**v0.10.2**

- Updated to KSP 1.6.0 and Kopernicus 1.6.0-1


**v0.10.1**

- Fixed PQSCity2Fixer
Expand Down
Expand Up @@ -9,6 +9,8 @@
&rotationPeriod = 544507.428516654
&inverseRotThresholdAltitude = 100000
&timewarpAltitudeLimits = 0 24500 24500 24500 40000 60000 80000 100000
&navballSwitchRadiusMult = 0.06
&navballSwitchRadiusMultLow = 0.055
%ScienceValues
{
&flyingAltitudeThreshold = 18000
Expand Down
Expand Up @@ -9,6 +9,8 @@
&rotationPeriod = 34800
&inverseRotThresholdAltitude = 100000
&timewarpAltitudeLimits = 0 10000 10000 30000 50000 100000 200000 300000
&navballSwitchRadiusMult = 0.06
&navballSwitchRadiusMultLow = 0.055
%ScienceValues
{
&flyingAltitudeThreshold = 18000
Expand Down
Expand Up @@ -9,6 +9,8 @@
&rotationPeriod = 65517.859375
&inverseRotThresholdAltitude = 100000
&timewarpAltitudeLimits = 0 30000 30000 60000 100000 300000 600000 800000
&navballSwitchRadiusMult = 0.06
&navballSwitchRadiusMultLow = 0.055
%ScienceValues
{
&flyingAltitudeThreshold = 12000
Expand Down
Expand Up @@ -9,6 +9,8 @@
&rotationPeriod = 19460
&inverseRotThresholdAltitude = 100000
&timewarpAltitudeLimits = 0 4000 4000 20000 30000 40000 70000 150000
&navballSwitchRadiusMult = 0.06
&navballSwitchRadiusMultLow = 0.055
%ScienceValues
{
&flyingAltitudeThreshold = 18000
Expand Down
Expand Up @@ -9,6 +9,8 @@
&rotationPeriod = 80500
&inverseRotThresholdAltitude = 100000
&timewarpAltitudeLimits = 0 30000 30000 60000 120000 240000 480000 600000
&navballSwitchRadiusMult = 0.06
&navballSwitchRadiusMultLow = 0.055
%ScienceValues
{
&flyingAltitudeThreshold = 22000
Expand Down
Expand Up @@ -9,6 +9,8 @@
&rotationPeriod = 28255
&inverseRotThresholdAltitude = 100000
&timewarpAltitudeLimits = 0 8000 8000 8000 20000 40000 80000 100000
&navballSwitchRadiusMult = 0.06
&navballSwitchRadiusMultLow = 0.055
%ScienceValues
{
&flyingAltitudeThreshold = 18000
Expand Down
Expand Up @@ -9,6 +9,8 @@
&rotationPeriod = 65517.8621348081
&inverseRotThresholdAltitude = 100000
&timewarpAltitudeLimits = 0 5000 5000 10000 25000 50000 100000 200000
&navballSwitchRadiusMult = 0.06
&navballSwitchRadiusMultLow = 0.055
%ScienceValues
{
&flyingAltitudeThreshold = 18000
Expand Down
Expand Up @@ -9,6 +9,8 @@
&rotationPeriod = 36000
&inverseRotThresholdAltitude = 220000
&timewarpAltitudeLimits = 0 0 15000 60000 150000 300000 600000 1200000
&navballSwitchRadiusMult = 0.06
&navballSwitchRadiusMultLow = 0.055
%ScienceValues
{
&flyingAltitudeThreshold = 120000
Expand Down
Expand Up @@ -9,6 +9,8 @@
&rotationPeriod = 21600
&inverseRotThresholdAltitude = 100000
&timewarpAltitudeLimits = 0 30000 30000 60000 120000 240000 480000 600000
&navballSwitchRadiusMult = 0.06
&navballSwitchRadiusMultLow = 0.055
%ScienceValues
{
&flyingAltitudeThreshold = 18000
Expand Down
Expand Up @@ -9,6 +9,8 @@
&rotationPeriod = 52980.8790593796
&inverseRotThresholdAltitude = 100000
&timewarpAltitudeLimits = 0 30000 30000 60000 120000 240000 480000 600000
&navballSwitchRadiusMult = 0.06
&navballSwitchRadiusMultLow = 0.055
%ScienceValues
{
&flyingAltitudeThreshold = 10000
Expand Down
Expand Up @@ -9,6 +9,8 @@
&rotationPeriod = 40400
&inverseRotThresholdAltitude = 100000
&timewarpAltitudeLimits = 0 3000 3000 6000 12000 24000 48000 60000
&navballSwitchRadiusMult = 0.06
&navballSwitchRadiusMultLow = 0.055
%ScienceValues
{
&flyingAltitudeThreshold = 18000
Expand Down
Expand Up @@ -9,6 +9,8 @@
&rotationPeriod = 1210000
&inverseRotThresholdAltitude = 100000
&timewarpAltitudeLimits = 0 10000 10000 30000 50000 100000 200000 300000
&navballSwitchRadiusMult = 0.06
&navballSwitchRadiusMultLow = 0.055
%ScienceValues
{
&flyingAltitudeThreshold = 18000
Expand Down
Expand Up @@ -9,6 +9,8 @@
&rotationPeriod = 138984.376574476
&inverseRotThresholdAltitude = 100000
&timewarpAltitudeLimits = 0 5000 5000 10000 25000 50000 100000 200000
&navballSwitchRadiusMult = 0.06
&navballSwitchRadiusMultLow = 0.055
%ScienceValues
{
&flyingAltitudeThreshold = 18000
Expand Down
Expand Up @@ -9,6 +9,8 @@
&rotationPeriod = 901902.623531173
&inverseRotThresholdAltitude = 100000
&timewarpAltitudeLimits = 0 5000 5000 5000 8000 12000 30000 90000
&navballSwitchRadiusMult = 0.06
&navballSwitchRadiusMultLow = 0.055
%ScienceValues
{
&flyingAltitudeThreshold = 18000
Expand Down
Expand Up @@ -9,6 +9,8 @@
&rotationPeriod = 432000
&inverseRotThresholdAltitude = 600000
&timewarpAltitudeLimits = 0 3270000 3270000 6540000 1.308E+07 2.616E+07 5.232E+07 6.54E+07
&navballSwitchRadiusMult = 0.06
&navballSwitchRadiusMultLow = 0.055
%ScienceValues
{
&flyingAltitudeThreshold = 18000
Expand Down
Expand Up @@ -9,6 +9,8 @@
&rotationPeriod = 211926.35802123
&inverseRotThresholdAltitude = 100000
&timewarpAltitudeLimits = 0 30000 30000 60000 120000 240000 480000 600000
&navballSwitchRadiusMult = 0.06
&navballSwitchRadiusMultLow = 0.055
%ScienceValues
{
&flyingAltitudeThreshold = 18000
Expand Down
Expand Up @@ -9,6 +9,8 @@
&rotationPeriod = 105962.088893924
&inverseRotThresholdAltitude = 100000
&timewarpAltitudeLimits = 0 24500 24500 24500 40000 60000 80000 100000
&navballSwitchRadiusMult = 0.06
&navballSwitchRadiusMultLow = 0.055
%ScienceValues
{
&flyingAltitudeThreshold = 18000
Expand Down
Expand Up @@ -6,6 +6,14 @@
{
@inverseRotThresholdAltitude *= #$../SigmaDimensions/Atmosphere$
@inverseRotThresholdAltitude *= #$../SigmaDimensions/atmoTopLayer$

@navballSwitchRadiusMult != 2
@navballSwitchRadiusMult /= #$../SigmaDimensions/Resize$
@navballSwitchRadiusMult != 0.5

@navballSwitchRadiusMultLow != 2
@navballSwitchRadiusMultLow /= #$../SigmaDimensions/Resize$
@navballSwitchRadiusMultLow != 0.5
}
}
@Body:HAS[!Atmosphere]
Expand Down
Binary file modified GameData/Sigma/Dimensions/Plugins/SigmaDimensions.dll
Binary file not shown.
Binary file modified [Source]/Distribution/SigmaDimensions.dll
Binary file not shown.
10 changes: 7 additions & 3 deletions [Source]/SigmaDimensions/AtmosphereTopLayer.cs
Expand Up @@ -3,6 +3,7 @@
using System.Linq;
using UnityEngine;
using Kopernicus;
using Kopernicus.ConfigParser.BuiltinTypeParsers;


namespace SigmaDimensionsPlugin
Expand Down Expand Up @@ -39,8 +40,10 @@ void FixPressure(CelestialBody body, double topLayer)
FloatCurve curve = body.atmospherePressureCurve;
List<double[]> list = ReadCurve(curve);

/* Remove ISP FIX ==> */ if (body.transform.name == "Kerbin" && list.Count > 0) { list.RemoveAt(0); }
/* Avoid Bad Curves ==> */ if (list.Count < 2) { UnityEngine.Debug.Log("SigmaLog: This pressure curve has " + (list.Count == 0 ? "no keys" : "just one key") + ". I don't know what you expect me to do with that."); return; }
/* Remove ISP FIX ==> */
if (body.transform.name == "Kerbin" && list.Count > 0) { list.RemoveAt(0); }
/* Avoid Bad Curves ==> */
if (list.Count < 2) { UnityEngine.Debug.Log("SigmaLog: This pressure curve has " + (list.Count == 0 ? "no keys" : "just one key") + ". I don't know what you expect me to do with that."); return; }

double maxAltitude = list.Last()[0];

Expand All @@ -64,7 +67,8 @@ void FixPressure(CelestialBody body, double topLayer)
Smooth(list);
}

/* Restore ISP FIX ==> */ if (body.transform.name == "Kerbin") { list.Insert(0, new[] { 0, 101.325, 0, 0, }); }
/* Restore ISP FIX ==> */
if (body.transform.name == "Kerbin") { list.Insert(0, new[] { 0, 101.325, 0, 0, }); }

curve.Load(WriteCurve(list));
}
Expand Down
2 changes: 1 addition & 1 deletion [Source]/SigmaDimensions/Compatibility.cs
@@ -1,6 +1,6 @@
using System.Linq;
using UnityEngine;
using Kopernicus;
using Kopernicus.ConfigParser.BuiltinTypeParsers;


namespace SigmaDimensionsPlugin
Expand Down
1 change: 1 addition & 0 deletions [Source]/SigmaDimensions/PQSCityGroupsLoader.cs
Expand Up @@ -2,6 +2,7 @@
using System.Linq;
using UnityEngine;
using Kopernicus;
using Kopernicus.ConfigParser.BuiltinTypeParsers;


namespace SigmaDimensionsPlugin
Expand Down
42 changes: 23 additions & 19 deletions [Source]/SigmaDimensions/PQSMod_SigmaDimensions.cs
@@ -1,6 +1,10 @@
using System.Reflection;
using UnityEngine;
using Kopernicus;
using Kopernicus.ConfigParser.Attributes;
using Kopernicus.ConfigParser.BuiltinTypeParsers;
using Kopernicus.ConfigParser.Enumerations;
using Kopernicus.ConfigParser.Interfaces;
using Kopernicus.Configuration;
using Kopernicus.Configuration.ModLoader;
using Debug = SigmaDimensionsPlugin.Debug;
Expand Down Expand Up @@ -32,64 +36,64 @@ public class SigmaDimensions : ModLoader<PQSMod_SigmaDimensions>, IParserEventSu
[ParserTarget("Resize", Optional = true)]
private NumericParser<double> Resize
{
get { return mod.Resize; }
set { mod.Resize = value; }
get { return Mod.Resize; }
set { Mod.Resize = value; }
}

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

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

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

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

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

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

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

void IParserEventSubscriber.Apply(ConfigNode node)
Expand All @@ -99,7 +103,7 @@ void IParserEventSubscriber.Apply(ConfigNode node)
void IParserEventSubscriber.PostApply(ConfigNode node)
{
// Always Load Last
mod.order = int.MaxValue;
Mod.order = int.MaxValue;
}
}

Expand All @@ -114,10 +118,10 @@ void Start()

void FixPQS(Body body, ConfigNode node)
{
Debug.Log("PQSModsFixer.FixPQS", "Body = " + body.name);
Debug.Log("PQSModsFixer.FixPQS", "Body = " + body.Name);

// generatedBody
PSystemBody generatedBody = body?.generatedBody;
PSystemBody generatedBody = body?.GeneratedBody;

// PQSMod_SigmaDimensions
PQSMod_SigmaDimensions mod = generatedBody?.pqsVersion?.gameObject?.GetComponentInChildren<PQS>(true)?.GetComponentInChildren<PQSMod_SigmaDimensions>(true);
Expand Down
5 changes: 4 additions & 1 deletion [Source]/SigmaDimensions/SettingsLoader.cs
@@ -1,5 +1,8 @@
using Kopernicus;
using Kopernicus.Configuration;
using Kopernicus.ConfigParser.Attributes;
using Kopernicus.ConfigParser.BuiltinTypeParsers;
using Kopernicus.ConfigParser.Interfaces;
using Kopernicus.Configuration.Parsing;


namespace SigmaDimensionsPlugin
Expand Down
1 change: 1 addition & 0 deletions [Source]/SigmaDimensions/SigmaDimensions.cs
Expand Up @@ -3,6 +3,7 @@
using System.Linq;
using UnityEngine;
using Kopernicus;
using Kopernicus.ConfigParser.BuiltinTypeParsers;


namespace SigmaDimensionsPlugin
Expand Down
8 changes: 0 additions & 8 deletions [Source]/SigmaDimensions/SigmaDimensions.csproj
Expand Up @@ -54,14 +54,6 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\[References]\Kopernicus\Kopernicus.dll</HintPath>
</Reference>
<Reference Include="Kopernicus.Components, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\[References]\Kopernicus\Kopernicus.Components.dll</HintPath>
</Reference>
<Reference Include="Kopernicus.OnDemand, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\[References]\Kopernicus\Kopernicus.OnDemand.dll</HintPath>
</Reference>
<Reference Include="Kopernicus.Parser, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\[References]\Kopernicus\Kopernicus.Parser.dll</HintPath>
Expand Down
2 changes: 1 addition & 1 deletion [Source]/SigmaDimensions/Version.cs
Expand Up @@ -6,7 +6,7 @@ namespace SigmaDimensionsPlugin
[KSPAddon(KSPAddon.Startup.Instantly, true)]
public class Version : MonoBehaviour
{
public static readonly System.Version number = new System.Version("0.10.1");
public static readonly System.Version number = new System.Version("0.10.3");

void Awake()
{
Expand Down

0 comments on commit f62e121

Please sign in to comment.