Skip to content

Commit 54405bd

Browse files
authored
Merge pull request #25 from Sigma88/Development
SigmaBinary v1.6.0
2 parents baa15fd + 1fbda5b commit 54405bd

File tree

17 files changed

+1018
-544
lines changed

17 files changed

+1018
-544
lines changed

Changelog.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
**v1.6.0**
2+
3+
- Updated to KSP 1.2.1 and Kopernicus 1.2.1-1
4+
- Fixed tracking station bug that made planets go off their orbits
5+
- Fixed science archives so that barycenter bodies are not shown
6+
- Removed compatibility with parameter 'selectable' for barycenters
7+
- Added automatic Kerbin reparenting when needed
8+
- Added compatibility with Kopernicus new feature 'PostSpawnOrbit'
9+
- Added compatibility with parameter 'iconColor' for barycenters
10+
- Added time dependent easter eggs
11+
- Added option to disable easter eggs (only for who hates fun)
12+
13+
114
**v1.5.5**
215

316
- Updated to KSP 1.1.3 and Kopernicus 1.1.2

GameData/Sigma/Binary/Configs/generateOrbits.cfg renamed to GameData/Sigma/Binary/Configs/addOrbits.cfg

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
@Kopernicus:FOR[SigmaBinary]
22
{
3+
@Body:HAS[@Orbit:HAS[#referenceBody[Sun]]]
4+
{
5+
!SigmaBinary,* {}
6+
}
7+
@Body:HAS[@SigmaBinary]
8+
{
9+
@SigmaBinary:HAS[~name[*]]
10+
{
11+
name = #$../Orbit/referenceBody$$../name$
12+
}
13+
}
314
@Body,*
415
{
516
@SigmaBinary

GameData/Sigma/Binary/Configs/checkMaxDistance.cfg

Lines changed: 0 additions & 99 deletions
This file was deleted.

GameData/Sigma/Binary/Configs/generateBarycenters.cfg

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
@Kopernicus:FOR[SigmaBinary]
22
{
3-
@Body:HAS[@Orbit:HAS[#referenceBody[Sun]]]
4-
{
5-
!SigmaBinary,* {}
6-
}
7-
@Body:HAS[@SigmaBinary]
8-
{
9-
@SigmaBinary:HAS[~name[*]]
10-
{
11-
name = #$../Orbit/referenceBody$$../name$
12-
}
13-
}
143
+Body:HAS[@SigmaBinary]
154
{
165
@name = SigmaBarycenter
@@ -39,7 +28,6 @@
3928
Orbit
4029
{
4130
referenceBody = Sun
42-
semiMajorAxis = #$/sbMaxDistance$
4331
}
4432
Atmosphere
4533
{
@@ -68,3 +56,11 @@
6856
!Body[SigmaBarycenter] {}
6957
MM_PATCH_LOOP {}
7058
}
59+
60+
@Kopernicus:FINAL
61+
{
62+
@Body,*
63+
{
64+
%Properties {}
65+
}
66+
}
20.5 KB
Binary file not shown.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"NAME": "Sigma Binary",
33
"URL": "https://raw.githubusercontent.com/Sigma88/Sigma-Binary/master/GameData/Sigma/Binary/Sigma-Binary.version",
4-
"DOWNLOAD": "http://forum.kerbalspaceprogram.com/threads/127820",
4+
"DOWNLOAD": "http://forum.kerbalspaceprogram.com/index.php?/topic/115114-0",
55
"CHANGE_LOG_URL": "https://github.com/Sigma88/Sigma-Binary/raw/master/Changelog.txt",
66
"GITHUB":
77
{
@@ -12,14 +12,14 @@
1212
"VERSION":
1313
{
1414
"MAJOR": 1,
15-
"MINOR": 5,
16-
"PATCH": 5,
15+
"MINOR": 6,
16+
"PATCH": 0,
1717
"BUILD": 0
1818
},
1919
"KSP_VERSION":
2020
{
2121
"MAJOR": 1,
22-
"MINOR": 1,
23-
"PATCH": 3
22+
"MINOR": 2,
23+
"PATCH": 1
2424
}
2525
}
20.5 KB
Binary file not shown.

[Source]/SigmaBinary/ArchiveFixer.cs

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
using System.Collections.Generic;
2+
using UnityEngine;
3+
using System;
4+
using System.Threading;
5+
using System.Reflection;
6+
using System.Linq;
7+
using KSP.UI.Screens;
8+
using KSP.UI;
9+
using Kopernicus.Components;
10+
11+
namespace SigmaBinaryPlugin
12+
{
13+
[KSPAddon(KSPAddon.Startup.MainMenu, true)]
14+
public class ArchivesFixerComponent : MonoBehaviour
15+
{
16+
void Update()
17+
{
18+
if (HighLogic.LoadedScene == GameScenes.SPACECENTER)
19+
{
20+
foreach (RDArchivesController item in Resources.FindObjectsOfTypeAll<RDArchivesController>())
21+
item.gameObject.AddOrGetComponent<ArchivesFixer>();
22+
}
23+
}
24+
}
25+
26+
public class ArchivesFixer : MonoBehaviour
27+
{
28+
void Start()
29+
{
30+
PSystemBody sun = PSystemManager.Instance.systemPrefab.GetComponentsInChildren<PSystemBody>(true).First(b => b.name == "Sun");
31+
foreach (string P in SigmaBinary.archivesFixerList.Keys)
32+
{
33+
PSystemBody primary = PSystemManager.Instance.systemPrefab.GetComponentsInChildren<PSystemBody>(true).First(b => b.name == P);
34+
PSystemBody barycenter = PSystemManager.Instance.systemPrefab.GetComponentsInChildren<PSystemBody>(true).First(b => b.name == SigmaBinary.archivesFixerList[P][0]);
35+
PSystemBody reference = PSystemManager.Instance.systemPrefab.GetComponentsInChildren<PSystemBody>(true).First(b => b.name == SigmaBinary.archivesFixerList[P][1]);
36+
37+
38+
if (primary.name == "Kerbin")
39+
sun.children.Remove(primary);
40+
41+
int index = reference.children.IndexOf(barycenter);
42+
43+
reference.children.Remove(barycenter);
44+
reference.children.Insert(index, primary);
45+
}
46+
47+
FieldInfo list = typeof(RDArchivesController).GetFields(BindingFlags.Instance | BindingFlags.NonPublic).Skip(7).First();
48+
MethodInfo add = typeof(RDArchivesController).GetMethods(BindingFlags.Instance | BindingFlags.NonPublic).Skip(27).First();
49+
50+
var archivesFixer = Resources.FindObjectsOfTypeAll<RDArchivesController>().First();
51+
52+
list.SetValue(archivesFixer, new Dictionary<string, List<RDArchivesController.Filter>>());
53+
add.Invoke(archivesFixer, null);
54+
}
55+
}
56+
}

[Source]/SigmaBinary/ColorSwitcher.cs

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)