@@ -130,12 +130,36 @@ public static PlanetData CreatePlanet(ref StarData star, GSPlanet gsPlanet, Rand
130130 if ( gsPlanet . MoonsCount > 0 ) CreateMoons ( ref planet , gsPlanet , random ) ;
131131 //Log("PLANET RADIUS "+planetData.radius);
132132 //Log("End|" + gsPlanet.Name);
133- if ( planet . orbitalPeriod == planet . rotationPeriod ) planet . singularity |= EPlanetSingularity . TidalLocked ;
134-
135- if ( planet . obliquity > 75 || planet . obliquity < - 75 ) planet . singularity |= EPlanetSingularity . LaySide ;
133+ //GS2.Log("Setting Singularities");
134+ //GS2.Log($"Added Planet {planet.name} to galaxy with id:{planet.id} and index:{planet.index} star:{planet.star.name} with id:{planet.star.id} rotation:{planet.rotationPeriod} orbit:{planet.orbitalPeriod} obliq:{planet.obliquity} bodies:{gsPlanet.Bodies.Count}");
135+ if ( Math . Abs ( planet . orbitalPeriod - planet . rotationPeriod ) < 1f ) {
136+ //GS2.Log("Setting TidalLock");
137+ planet . singularity |= EPlanetSingularity . TidalLocked ;
138+ }
139+ if ( Math . Abs ( planet . orbitalPeriod - planet . rotationPeriod * 2 ) < 1f ) {
140+ //GS2.Log("Setting TidalLock2");
141+ planet . singularity |= EPlanetSingularity . TidalLocked2 ;
142+ }
143+ if ( Math . Abs ( planet . orbitalPeriod - planet . rotationPeriod * 4 ) < 1f ) {
144+ //GS2.Log("Setting TidalLock4");
145+ planet . singularity |= EPlanetSingularity . TidalLocked4 ;
146+ }
147+ if ( gsPlanet . Bodies . Count > 2 ) {
148+ //GS2.Log("Setting Multisatellite");
149+ planet . singularity |= EPlanetSingularity . MultipleSatellites ;
150+ }
151+ if ( planet . obliquity > 75 || planet . obliquity < - 75 ) {
152+ //GS2.Log("Setting LaySide");
153+ planet . singularity |= EPlanetSingularity . LaySide ;
154+ }
136155
137- if ( planet . rotationPeriod < 0 ) planet . singularity |= EPlanetSingularity . ClockwiseRotate ;
138- //GS2.Log($"Added Planet {planet.name} to galaxy with id:{planet.id} and index:{planet.index} star:{planet.star.name} with id:{planet.star.id}");
156+ if ( planet . rotationPeriod < 0 )
157+ {
158+ //GS2.Log("Setting ReverseRotation");
159+ planet . singularity |= EPlanetSingularity . ClockwiseRotate ;
160+ }
161+
162+ GS2 . Warn ( planet . singularityString + " " + planet . singularity ) ;
139163 // Log($"{planet.name} created in {highStopwatch.duration:F5} s\r\n");
140164 return planet ;
141165 }
@@ -172,7 +196,7 @@ public static void CreateMoons(ref PlanetData planetData, GSPlanet planet, Rando
172196 }
173197
174198 moon . orbitAroundPlanet = planetData ;
175- if ( i > 1 ) planetData . singularity |= EPlanetSingularity . MultipleSatellites ;
199+
176200 }
177201 }
178202
0 commit comments