@@ -54,83 +54,6 @@ public static void TextureFixer(Body body1, Body body2, List<Body> list)
5454 }
5555 }
5656 }
57- if ( SigmaBinary . ListOfBinaries . Count == 0 && DateTime . Today . Day == 14 && DateTime . Today . Month == 3 )
58- {
59- string [ ] P = new string [ ] { "92653" , "58979" , "32384" , "62643" , "38327" , "95028" , "84197" , "16939" , "93751" , "05820" , "97494" , "45923" , "07816" , "40628" , "62089" , "98628" , "03482" , "53421" , "17067" , "98214" } ;
60- Dictionary < CelestialBody , double > pList = new Dictionary < CelestialBody , double > ( ) ;
61-
62- foreach ( Body pBody in SigmaBinary . ListOfBodies )
63- {
64- if ( pBody . name == "Sun" )
65- {
66- if ( ! pBody . generatedBody . celestialBody . GetComponent < NameChanger > ( ) )
67- {
68- NameChanger changer = pBody . generatedBody . celestialBody . gameObject . AddComponent < NameChanger > ( ) ;
69- changer . oldName = pBody . name ;
70- changer . newName = "3.1415" ;
71- }
72- else
73- pBody . generatedBody . celestialBody . gameObject . AddComponent < NameChanger > ( ) . newName = "3.1415" ;
74- }
75- else if ( pBody . generatedBody . celestialBody . Has ( "orbitPatches" ) && pBody . generatedBody . celestialBody . Get < ConfigNode > ( "orbitPatches" ) . GetValue ( "referenceBody" ) == "Sun" )
76- {
77- pList . Add ( pBody . generatedBody . celestialBody , pBody . generatedBody . orbitDriver . orbit . semiMajorAxis ) ;
78- }
79- else if ( pBody . orbit . referenceBody == "Sun" && ! ( pBody . generatedBody . celestialBody . Has ( "orbitPatches" ) && pBody . generatedBody . celestialBody . Get < ConfigNode > ( "orbitPatches" ) . GetValue ( "referenceBody" ) != "Sun" ) )
80- {
81- if ( ! ( pBody . name == "Kerbin" && SigmaBinary . kerbinFixer != "Sun" ) )
82- {
83- pList . Add ( pBody . generatedBody . celestialBody , pBody . generatedBody . orbitDriver . orbit . semiMajorAxis ) ;
84- }
85- }
86-
87- if ( pList . ContainsKey ( pBody . generatedBody . celestialBody ) && pBody . generatedBody . celestialBody . Has ( "orbitPatches" ) && pBody . generatedBody . celestialBody . Get < ConfigNode > ( "orbitPatches" ) . GetValue ( "semiMajorAxis" ) != null )
88- {
89- NumericParser < double > sma = new NumericParser < double > ( ) ;
90- sma . SetFromString ( pBody . generatedBody . celestialBody . Get < ConfigNode > ( "orbitPatches" ) . GetValue ( "semiMajorAxis" ) ) ;
91- pList [ pBody . generatedBody . celestialBody ] = sma . value ;
92- }
93- }
94-
95- foreach ( string pSBP in SigmaBinary . archivesFixerList . Keys )
96- {
97- if ( pSBP == "Kerbin" )
98- {
99- CelestialBody pKF = pList . Keys . ToList ( ) . Find ( KF => KF . name == SigmaBinary . kerbinFixer ) ;
100- if ( pKF != null )
101- {
102- pList . Add ( SigmaBinary . ListOfBodies . Find ( SBP => SBP . name == pSBP ) . generatedBody . celestialBody , pList [ pKF ] ) ;
103- pList . Remove ( pKF ) ;
104- }
105- }
106- else
107- {
108- CelestialBody pSBB = pList . Keys . ToList ( ) . Find ( pREF => pREF . name == SigmaBinary . ListOfBodies . Find ( SBP => SBP . name == pSBP ) . orbit . referenceBody ) ;
109- if ( pSBB != null )
110- {
111- pList . Add ( SigmaBinary . ListOfBodies . Find ( SBP => SBP . name == pSBP ) . generatedBody . celestialBody , pList [ pSBB ] ) ;
112- pList . Remove ( pSBB ) ;
113- }
114- }
115- }
116-
117- int pCount = 0 ;
118- foreach ( KeyValuePair < CelestialBody , double > pFix in pList . OrderBy ( pKey => pKey . Value ) )
119- {
120- if ( pCount < 20 )
121- {
122- if ( ! pFix . Key . GetComponent < NameChanger > ( ) )
123- {
124- NameChanger changer = pFix . Key . gameObject . AddComponent < NameChanger > ( ) ;
125- changer . oldName = pFix . Key . name ;
126- changer . newName = P [ pCount ] ;
127- }
128- else
129- pFix . Key . gameObject . GetComponent < NameChanger > ( ) . newName = P [ pCount ] ;
130- pCount ++ ;
131- }
132- }
133- }
13457 if ( DateTime . Today . Day == 1 && DateTime . Today . Month == 4 )
13558 {
13659 EnumParser < BodyType > type1 = new EnumParser < BodyType > ( body1 . template == null ? BodyType . Atmospheric : body1 . template . type ) ;
0 commit comments