Skip to content

Commit 2d11739

Browse files
committed
Merge pull request #17 from Sigma88/Development
Update to KSP 1.1.2
2 parents fba387f + f95e58c commit 2d11739

File tree

7 files changed

+106
-2
lines changed

7 files changed

+106
-2
lines changed

Changelog.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
**v1.5.1**
2+
3+
- Updated to KSP 1.1 and Kopernicus 1.0
4+
- Fixed a bug with binary systems outside the orbit of Jool
5+
6+
17
**v1.5.0**
28

39
- Updated to KSP 1.1 and Kopernicus 1.0
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
@Kopernicus:FOR[SigmaBinary]
2+
{
3+
%sbMaxDistance = 113549713200
4+
!Kopernicus,* {}
5+
#@Kopernicus {}
6+
@Kopernicus
7+
{
8+
!Body:HAS[!Orbit:HAS[#referenceBody[Sun]]] {}
9+
@Body:HAS[@Template[Dres]]
10+
{
11+
@Orbit:HAS[~eccentricity[*]]
12+
{
13+
eccentricity = 0.145
14+
}
15+
}
16+
@Body:HAS[@Template[Pol]]
17+
{
18+
@Orbit:HAS[~eccentricity[*]]
19+
{
20+
eccentricity = 0.17085
21+
}
22+
}
23+
@Body:HAS[@Template[Moho]]
24+
{
25+
@Orbit:HAS[~eccentricity[*]]
26+
{
27+
eccentricity = 0.200000002980232
28+
}
29+
}
30+
@Body:HAS[@Template[Bop]]
31+
{
32+
@Orbit:HAS[~eccentricity[*]]
33+
{
34+
eccentricity = 0.234999999403954
35+
}
36+
}
37+
@Body:HAS[@Template[Eeloo]]
38+
{
39+
@Orbit:HAS[~eccentricity[*]]
40+
{
41+
eccentricity = 0.26
42+
}
43+
}
44+
@Body:HAS[@Template[Jool]]
45+
{
46+
@Orbit:HAS[~eccentricity[*]]
47+
{
48+
eccentricity = 0.550000011920929
49+
}
50+
}
51+
@Body,*
52+
{
53+
@Orbit:HAS[#eccentricity[>0]]
54+
{
55+
@eccentricity += 1
56+
@semiMajorAxis *= #$eccentricity$
57+
}
58+
@Orbit
59+
{
60+
@semiMajorAxis -= #$/sbMaxDistance$
61+
}
62+
}
63+
!Body:HAS[!Orbit:HAS[#semiMajorAxis[>0]]] {}
64+
@Body,*
65+
{
66+
@Orbit
67+
{
68+
@semiMajorAxis += #$/sbMaxDistance$
69+
}
70+
}
71+
}
72+
!Kopernicus:HAS[!Body] {}
73+
}
74+
@Kopernicus:HAS[@Kopernicus]:FOR[SigmaBinary]
75+
{
76+
@sbMaxDistance = #$Kopernicus/Body/Orbit/semiMajorAxis$
77+
@Kopernicus
78+
{
79+
@Body,*
80+
{
81+
@Orbit
82+
{
83+
@semiMajorAxis -= #$/sbMaxDistance$
84+
}
85+
}
86+
!Body:HAS[!Orbit:HAS[#semiMajorAxis[>0]]] {}
87+
@Body,*
88+
{
89+
@Orbit
90+
{
91+
@semiMajorAxis += #$/sbMaxDistance$
92+
}
93+
}
94+
}
95+
!Kopernicus:HAS[!Body] {}
96+
MM_PATCH_LOOP {}
97+
}

GameData/Sigma/Binary/Configs/generateBarycenters.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
Orbit
4040
{
4141
referenceBody = Sun
42+
semiMajorAxis = #$/sbMaxDistance$
4243
}
4344
Atmosphere
4445
{
0 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":0,"BUILD":0},"KSP_VERSION":{"MAJOR":1,"MINOR":1,"PATCH":0}}
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}}
0 Bytes
Binary file not shown.

[Source]/SigmaBinary/SigmaBinary.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ void Start()
106106
sbBarycenter.orbit.referenceBody = sbPrimary.orbit.referenceBody;
107107
sbBarycenter.orbit.period = sbPrimary.orbit.period;
108108
sbBarycenter.orbit.ObTAtEpoch = sbPrimary.orbit.ObTAtEpoch;
109-
sbBarycenter.GeeASL = 6.674e-11d / Math.Pow(sbBarycenter.Radius, 2) / 9.81d;
109+
sbBarycenter.GeeASL = (sbPrimary.Mass / 1e5d) * 6.674e-11d / Math.Pow(sbBarycenter.Radius, 2) / 9.81d;
110110
sbBarycenter.rotationPeriod = body.orbit.period;
111111
sbBarycenter.orbitDriver.orbitColor = sbPrimary.orbitDriver.orbitColor;
112112

0 commit comments

Comments
 (0)