Skip to content

Commit cfa27a1

Browse files
authored
Merge pull request #29 from Sigma88/Development
v1.6.2
2 parents 6fe3870 + 9e27c87 commit cfa27a1

File tree

12 files changed

+34
-82
lines changed

12 files changed

+34
-82
lines changed

Changelog.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
**v1.6.2**
2+
3+
- Updated to KSP 1.2.2 and Kopernicus 1.2.2-1
4+
5+
16
**v1.6.1**
27

38
- Fixed Kopernicus compatibility (again)
0 Bytes
Binary file not shown.

GameData/Sigma/Binary/SigmaBinary.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
{
1414
"MAJOR": 1,
1515
"MINOR": 6,
16-
"PATCH": 1,
16+
"PATCH": 2,
1717
"BUILD": 0
1818
},
1919
"KSP_VERSION":
0 Bytes
Binary file not shown.

[Source]/SigmaBinary/ArchivesFixer.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
using System.Collections.Generic;
2-
using UnityEngine;
3-
using System;
4-
using System.Threading;
5-
using System.Reflection;
62
using System.Linq;
3+
using System.Reflection;
4+
using UnityEngine;
75
using KSP.UI.Screens;
8-
using KSP.UI;
9-
using Kopernicus.Components;
6+
107

118
namespace SigmaBinaryPlugin
129
{
@@ -22,7 +19,7 @@ void Update()
2219
}
2320
}
2421
}
25-
22+
2623
public class ArchivesFixer : MonoBehaviour
2724
{
2825
void Start()

[Source]/SigmaBinary/KerbinFixer.cs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
using System;
2-
using System.Linq;
3-
using System.Collections.Generic;
4-
1+
using System.Collections.Generic;
52
using UnityEngine;
63

7-
using Kopernicus.Components;
8-
using Kopernicus.Configuration;
9-
10-
114

125
namespace SigmaBinaryPlugin
136
{
@@ -29,9 +22,8 @@ void Start()
2922
{
3023
List<MapObject> trackingstation = new List<MapObject>();
3124
List<string> children = new List<string>();
32-
33-
children.Add("Kerbin");
3425

26+
children.Add("Kerbin");
3527

3628
for (int count = 1; count > 0;)
3729
{
@@ -46,7 +38,6 @@ void Start()
4638
}
4739
}
4840

49-
5041
foreach (MapObject m in PlanetariumCamera.fetch.targets)
5142
{
5243
if (m != null)
@@ -66,10 +57,9 @@ void Start()
6657
}
6758
}
6859

69-
7060
PlanetariumCamera.fetch.targets.Clear();
7161
PlanetariumCamera.fetch.targets.AddRange(trackingstation);
7262
}
7363
}
7464
}
75-
}
65+
}

[Source]/SigmaBinary/LateFixes.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
using System;
22
using System.Linq;
33
using System.Collections.Generic;
4-
54
using UnityEngine;
6-
5+
using KSP.UI.Screens;
76
using Kopernicus;
87
using Kopernicus.Components;
98
using Kopernicus.Configuration;
109
using Kopernicus.OnDemand;
1110

12-
using KSP.UI.Screens;
13-
14-
1511

1612
namespace SigmaBinaryPlugin
1713
{

[Source]/SigmaBinary/MapViewFixer.cs

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,23 @@
1-
2-
using UnityEngine;
3-
using Kopernicus.Components;
4-
using System;
5-
using System.Collections.Generic;
61
using System.Reflection;
72
using System.Linq;
8-
using JetBrains.Annotations;
9-
using Kopernicus.Configuration;
10-
using KSP.UI.Screens;
3+
using UnityEngine;
114
using KSP.UI.Screens.Mapview;
125
using KSP.UI.Screens.Mapview.MapContextMenuOptions;
6+
using Kopernicus.Components;
7+
138

149
namespace SigmaBinaryPlugin
1510
{
1611
[KSPAddon(KSPAddon.Startup.MainMenu, true)]
1712
public class MapViewFixer : MonoBehaviour
1813
{
1914
private FieldInfo[] fields;
20-
15+
2116
void Awake()
2217
{
2318
DontDestroyOnLoad(this);
2419
}
25-
20+
2621
void LateUpdate()
2722
{
2823
if (MapView.MapIsEnabled)
@@ -37,8 +32,8 @@ void LateUpdate()
3732
if (FlightGlobals.ActiveVessel != null)
3833
{
3934
OrbitTargeter targeter = FlightGlobals.ActiveVessel.orbitTargeter;
40-
41-
Int32 mode = (Int32)fields[0].GetValue(targeter);
35+
36+
int mode = (int)fields[0].GetValue(targeter);
4237
if (mode == 2)
4338
{
4439
OrbitRenderer.OrbitCastHit cast = (OrbitRenderer.OrbitCastHit)fields[2].GetValue(targeter);
@@ -50,7 +45,7 @@ void LateUpdate()
5045
CelestialBody body2 = PSystemManager.Instance.localBodies.Find(b => b.transform.name == SigmaBinary.mapViewFixerList[body.transform.name]);
5146

5247
((MapContextMenu)fields[1].GetValue(targeter)).Dismiss();
53-
48+
5449
MapContextMenu context =
5550
MapContextMenu.Create
5651
(

[Source]/SigmaBinary/PeriodFixer.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
using System;
2-
using System.Linq;
3-
using System.Collections.Generic;
4-
52
using UnityEngine;
63

7-
using Kopernicus.Components;
8-
using Kopernicus.Configuration;
9-
10-
114

125
namespace SigmaBinaryPlugin
136
{
@@ -32,3 +25,4 @@ void Start()
3225
}
3326
}
3427
}
28+

[Source]/SigmaBinary/SigmaBinary.cs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
using System;
22
using System.Linq;
33
using System.Collections.Generic;
4-
54
using UnityEngine;
6-
75
using Kopernicus.Components;
86
using Kopernicus.Configuration;
9-
using Kopernicus.OnDemand;
107
using Kopernicus;
118

129

13-
1410
namespace SigmaBinaryPlugin
1511
{
16-
[ExternalParserTarget("Properties")]
17-
public class SigmaBinary : ExternalParserTargetLoader, IParserEventSubscriber
12+
[ParserTargetExternal("Body", "Properties")]
13+
public class SigmaBinary : BaseLoader, IParserEventSubscriber
1814
{
1915

2016
public static List<Body> ListOfBodies = new List<Body>();
@@ -37,8 +33,6 @@ public class SigmaBinary : ExternalParserTargetLoader, IParserEventSubscriber
3733
public static Dictionary<Body, EnumParser<OrbitRenderer.DrawIcons>> sigmabinaryIcon = new Dictionary<Body, EnumParser<OrbitRenderer.DrawIcons>>();
3834

3935

40-
41-
4236
void IParserEventSubscriber.Apply(ConfigNode node)
4337
{
4438
}
@@ -77,7 +71,6 @@ void IParserEventSubscriber.PostApply(ConfigNode node)
7771

7872

7973

80-
8174
/// Generating Binary System
8275

8376

@@ -104,7 +97,6 @@ void IParserEventSubscriber.PostApply(ConfigNode node)
10497

10598

10699

107-
108100
/// Set Barycenter
109101

110102
sbBarycenter.generatedBody.orbitDriver.orbit = new Orbit(sbPrimary.generatedBody.orbitDriver.orbit);
@@ -175,7 +167,6 @@ void IParserEventSubscriber.PostApply(ConfigNode node)
175167

176168

177169

178-
179170
/// Set Primary
180171

181172
if (!archivesFixerList.ContainsKey(sbPrimary.name))
@@ -214,7 +205,6 @@ void IParserEventSubscriber.PostApply(ConfigNode node)
214205

215206

216207

217-
218208
/// Set Secondary Orbit
219209

220210
if (sigmabinaryRedrawOrbit.Contains(sbSecondary))
@@ -247,7 +237,6 @@ void IParserEventSubscriber.PostApply(ConfigNode node)
247237

248238

249239

250-
251240
/// Set SphereOfInfluence for Barycenter and Primary
252241

253242
if (!cbPrimary.Has("sphereOfInfluence"))
@@ -273,7 +262,6 @@ void IParserEventSubscriber.PostApply(ConfigNode node)
273262

274263

275264

276-
277265
/// Binary System Completed
278266

279267
ListOfBinaries.Remove(ListOfBinaries.First(x => x.Value == sbSecondary).Key);

0 commit comments

Comments
 (0)