Skip to content

Commit a99b88e

Browse files
committed
Merge pull request #19 from Sigma88/Development
fix science archives
2 parents d82e992 + 76c684c commit a99b88e

File tree

8 files changed

+39
-1
lines changed

8 files changed

+39
-1
lines changed

Changelog.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
**v1.5.2**
2+
3+
- Fixed science archives
4+
5+
16
**v1.5.1**
27

38
- Updated to KSP 1.1.2 and Kopernicus 1.0.3
512 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"NAME":"Sigma: Binary","URL":"http://ksp-avc.cybutek.net/version.php?id=188","DOWNLOAD":"http://forum.kerbalspaceprogram.com/threads/127820","CHANGE_LOG_URL":"https://github.com/Sigma88/Sigma-Binary/raw/master/Changelog.txt","VERSION":{"MAJOR":1,"MINOR":5,"PATCH":1,"BUILD":0},"KSP_VERSION":{"MAJOR":1,"MINOR":1,"PATCH":2}}
1+
{"NAME":"Sigma: Binary","URL":"http://ksp-avc.cybutek.net/version.php?id=188","DOWNLOAD":"http://forum.kerbalspaceprogram.com/threads/127820","CHANGE_LOG_URL":"https://github.com/Sigma88/Sigma-Binary/raw/master/Changelog.txt","VERSION":{"MAJOR":1,"MINOR":5,"PATCH":2,"BUILD":0},"KSP_VERSION":{"MAJOR":1,"MINOR":1,"PATCH":2}}
512 Bytes
Binary file not shown.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using System.Collections.Generic;
2+
using UnityEngine;
3+
using SigmaBinaryPlugin.Components;
4+
using SigmaBinaryPlugin.Configuration;
5+
using System;
6+
using System.Reflection;
7+
using System.Linq;
8+
using KSP.UI.Screens;
9+
using Kopernicus.Components;
10+
11+
namespace SigmaBinaryPlugin
12+
{
13+
namespace Configuration
14+
{
15+
[KSPAddon(KSPAddon.Startup.SpaceCentre, false)]
16+
public class ArchivesFixer : MonoBehaviour
17+
{
18+
void Update()
19+
{
20+
foreach (RDPlanetListItemContainer planetItem in Resources.FindObjectsOfTypeAll<RDPlanetListItemContainer>())
21+
{
22+
if (SigmaBinaryLoader.ArchivesFixerList.Contains(planetItem.label_planetName.text))
23+
{
24+
planetItem.gameObject.SetActive(false);
25+
}
26+
}
27+
}
28+
}
29+
}
30+
}

[Source]/SigmaBinary/SigmaBinary.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ void Start()
6464
if (sb.bodyName == sbName)
6565
{
6666
sbBarycenter = sb;
67+
SigmaBinaryLoader.ArchivesFixerList.Add(sb.name);
6768
}
6869
}
6970
if (redrawOrbit)

[Source]/SigmaBinary/SigmaBinary.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
</Reference>
6060
</ItemGroup>
6161
<ItemGroup>
62+
<Compile Include="ArchiveFixer.cs" />
6263
<Compile Include="ColorSwitcher.cs" />
6364
<Compile Include="Properties\AssemblyInfo.cs" />
6465
<Compile Include="SigmaBinary.cs" />

[Source]/SigmaBinary/SigmaBinaryLoader.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ namespace Configuration
1818
public class SigmaBinaryLoader : ExternalParserTargetLoader, IParserEventSubscriber
1919
{
2020
public SigmaBinary sigmabinary { get; set; }
21+
public static List<string> ArchivesFixerList = new List<string>();
2122
public static Dictionary<string, CelestialBody> sigmabinaryLoadAfter = new Dictionary<string, CelestialBody>();
2223
public static Dictionary<string, string> sigmabinaryName = new Dictionary<string, string>();
2324
public static Dictionary<string, bool> sigmabinaryPrimaryLocked = new Dictionary<string, bool>();

0 commit comments

Comments
 (0)