@@ -26,7 +26,7 @@ namespace FieldTrainingLab
2626 /// <summary></summary><seealso cref="PartModule" />
2727 public class FieldTrainingLab : PartModule
2828 {
29- readonly ProtoCrewMember [ ] crewArr = new ProtoCrewMember [ 8 ] ;
29+ readonly ProtoCrewMember [ ] crewArr = new ProtoCrewMember [ 8 ] ;
3030 readonly string [ ] eventArr =
3131 {
3232 "TrainKerbalInside0" ,
@@ -59,63 +59,63 @@ public class FieldTrainingLab : PartModule
5959 [ KSPField ]
6060 public int TrainFactor = 20 ;
6161
62- /// <summary>Space situational cost adjustment</summary>
63- [ KSPField ]
62+ /// <summary>Space situational cost adjustment</summary>
63+ [ KSPField ]
6464 public float inSpace = 0.5f ;
6565
66- /// <summary>Landed situational cost adjustment</summary>
67- [ KSPField ]
66+ /// <summary>Landed situational cost adjustment</summary>
67+ [ KSPField ]
6868 public float Landed = 0.25f ;
6969
70- /// <summary>Time Factor</summary>
71- [ KSPField ]
70+ /// <summary>Time Factor</summary>
71+ [ KSPField ]
7272 public float TimeFactor = 426 * 6 * 60 * 60 ; // 1Year = 426day, 1day = 6hour, 1hour = 60minutes, 1min = 60sec
7373
74- /// <summary>Training Lab Status</summary>
75- [ KSPField ( isPersistant = true , guiActive = true , groupStartCollapsed = true , groupName = __GroupName__ , guiName = "#FTL-status" ) ]
74+ /// <summary>Training Lab Status</summary>
75+ [ KSPField ( isPersistant = true , guiActive = true , groupStartCollapsed = true , groupName = __GroupName__ , guiName = "#FTL-status" ) ]
7676 public bool TrainingStatus = false ;
7777
78- /// <summary>Science Points Remaining</summary>
79- [ KSPField ( guiActive = false , groupName = __GroupName__ , guiName = "#FTL-funds-sci" ) ]
78+ /// <summary>Science Points Remaining</summary>
79+ [ KSPField ( guiActive = false , groupName = __GroupName__ , guiName = "#FTL-funds-sci" ) ]
8080 public int SciRemain ;
8181
82- /// <summary>Training 0</summary>
83- [ KSPEvent ( guiActive = false , groupName = __GroupName__ , guiName = "#FTL-training-0" ) ]
82+ /// <summary>Training 0</summary>
83+ [ KSPEvent ( guiActive = false , groupName = __GroupName__ , guiName = "#FTL-training-0" ) ]
8484 public void TrainKerbalInside0 ( )
8585 { TrainKerbal ( 0 ) ; }
8686
87- /// <summary>Training 1</summary>
88- [ KSPEvent ( guiActive = false , groupName = __GroupName__ , guiName = "#FTL-training-1" ) ]
87+ /// <summary>Training 1</summary>
88+ [ KSPEvent ( guiActive = false , groupName = __GroupName__ , guiName = "#FTL-training-1" ) ]
8989 public void TrainKerbalInside1 ( )
9090 { TrainKerbal ( 1 ) ; }
9191
92- /// <summary>Training 2</summary>
93- [ KSPEvent ( guiActive = false , groupName = __GroupName__ , guiName = "#FTL-training-2" ) ]
92+ /// <summary>Training 2</summary>
93+ [ KSPEvent ( guiActive = false , groupName = __GroupName__ , guiName = "#FTL-training-2" ) ]
9494 public void TrainKerbalInside2 ( )
9595 { TrainKerbal ( 2 ) ; }
9696
97- /// <summary>Training 3</summary>
98- [ KSPEvent ( guiActive = false , groupName = __GroupName__ , guiName = "#FTL-training-3" ) ]
97+ /// <summary>Training 3</summary>
98+ [ KSPEvent ( guiActive = false , groupName = __GroupName__ , guiName = "#FTL-training-3" ) ]
9999 public void TrainKerbalInside3 ( )
100100 { TrainKerbal ( 3 ) ; }
101101
102- /// <summary>Training 4</summary>
103- [ KSPEvent ( guiActive = false , groupName = __GroupName__ , guiName = "#FTL-training-4" ) ]
102+ /// <summary>Training 4</summary>
103+ [ KSPEvent ( guiActive = false , groupName = __GroupName__ , guiName = "#FTL-training-4" ) ]
104104 public void TrainKerbalInside4 ( )
105105 { TrainKerbal ( 4 ) ; }
106106
107- /// <summary>Training 5</summary>
108- [ KSPEvent ( guiActive = false , groupName = __GroupName__ , guiName = "#FTL-training-5" ) ]
107+ /// <summary>Training 5</summary>
108+ [ KSPEvent ( guiActive = false , groupName = __GroupName__ , guiName = "#FTL-training-5" ) ]
109109 public void TrainKerbalInside5 ( )
110110 { TrainKerbal ( 5 ) ; }
111111
112- /// <summary>Training 6</summary>
113- [ KSPEvent ( guiActive = false , groupName = __GroupName__ , guiName = "#FTL-training-6" ) ]
112+ /// <summary>Training 6</summary>
113+ [ KSPEvent ( guiActive = false , groupName = __GroupName__ , guiName = "#FTL-training-6" ) ]
114114 public void TrainKerbalInside6 ( )
115115 { TrainKerbal ( 6 ) ; }
116116
117- /// <summary>Training 7</summary>
118- [ KSPEvent ( guiActive = false , groupName = __GroupName__ , guiName = "#FTL-training-7" ) ]
117+ /// <summary>Training 7</summary>
118+ [ KSPEvent ( guiActive = false , groupName = __GroupName__ , guiName = "#FTL-training-7" ) ]
119119 public void TrainKerbalInside7 ( )
120120 { TrainKerbal ( 7 ) ; }
121121
@@ -135,7 +135,7 @@ private void TrainKerbal(int index)
135135
136136 float SciCost = CalculateSciCost ( levelUpExpTable [ lastLog ] , crew ) ;
137137 if ( ResearchAndDevelopment . Instance . Science < SciCost )
138- {
138+ {
139139 ScreenMessages . PostScreenMessage ( Localizer . Format ( "#FTL-insufficent" , Localizer . Format ( "#FTL-funds-sci" ) , SciCost , ResearchAndDevelopment . Instance . Science ) ) ;
140140 // ScreenMessages.PostScreenMessage("Insufficient Science Points.\n" + "Needed : " + SciCost + ", Remain : " + ResearchAndDevelopment.Instance.Science);
141141 return ;
@@ -152,31 +152,31 @@ private void TrainKerbal(int index)
152152#region public functions
153153
154154 /// <summary>OnAwake</summary>
155- public override void OnAwake ( ) { base . OnAwake ( ) ; }
155+ public override void OnAwake ( ) { base . OnAwake ( ) ; }
156156
157157 /// <summary>OnStart</summary>
158- public override void OnStart ( StartState state )
159- {
160- base . OnStart ( state ) ;
158+ public override void OnStart ( StartState state )
159+ {
160+ base . OnStart ( state ) ;
161161
162- if ( HighLogic . CurrentGame . Parameters . CustomParams < FTL_Options > ( ) . coloredPAW )
163- Fields [ "TrainingStatus" ] . group . displayName = System . String . Format ( "<color=#FEDD00>" + Localizer . Format ( "#FTL-nameV" , Version . SText ) + "</color>" ) ;
164- else
165- Fields [ "TrainingStatus" ] . group . displayName = Localizer . Format ( "#FTL-nameV" , Version . SText ) ;
166- }
162+ if ( HighLogic . CurrentGame . Parameters . CustomParams < FTL_Options > ( ) . coloredPAW )
163+ Fields [ "TrainingStatus" ] . group . displayName = System . String . Format ( "<color=#FEDD00>" + Localizer . Format ( "#FTL-nameV" , Version . SText ) + "</color>" ) ;
164+ else
165+ Fields [ "TrainingStatus" ] . group . displayName = Localizer . Format ( "#FTL-nameV" , Version . SText ) ;
166+ }
167167
168- /// <summary>OnInactive</summary>
169- public override void OnInactive ( ) { base . OnInactive ( ) ; }
168+ /// <summary>OnInactive</summary>
169+ public override void OnInactive ( ) { base . OnInactive ( ) ; }
170170
171- /// <summary>OnInitialize</summary>
172- public override void OnInitialize ( ) { base . OnInitialize ( ) ; }
171+ /// <summary>OnInitialize</summary>
172+ public override void OnInitialize ( ) { base . OnInitialize ( ) ; }
173173
174- /// <summary>OnFixedUpdate</summary>
175- public override void OnFixedUpdate ( )
174+ /// <summary>OnFixedUpdate</summary>
175+ public override void OnFixedUpdate ( )
176176 { base . OnFixedUpdate ( ) ; }
177177
178- /// <summary>OnUpdate</summary>
179- public override void OnUpdate ( )
178+ /// <summary>OnUpdate</summary>
179+ public override void OnUpdate ( )
180180 {
181181 if ( HighLogic . CurrentGame . Mode != Game . Modes . CAREER ) return ;
182182 Fields [ "SciRemain" ] . guiActive = true ;
@@ -221,10 +221,10 @@ private int CalculateSciCost(float baseValue, ProtoCrewMember crew)
221221 return ret ;
222222 }
223223
224- /// <summary>GetKerbalTrainingExp</summary>
225- /// <param name="crew"></param>
226- /// <returns></returns>
227- private double GetKerbalTrainingExp ( ProtoCrewMember crew )
224+ /// <summary>GetKerbalTrainingExp</summary>
225+ /// <param name="crew"></param>
226+ /// <returns></returns>
227+ private double GetKerbalTrainingExp ( ProtoCrewMember crew )
228228 {
229229 string lastExpStr = "0" ;
230230
@@ -236,9 +236,9 @@ private double GetKerbalTrainingExp(ProtoCrewMember crew)
236236 return double . Parse ( lastExpStr ) ;
237237 }
238238
239- /// <summary>RemoveKerbalTrainingExp</summary>
240- /// <param name="crew"></param>
241- private void RemoveKerbalTrainingExp ( ProtoCrewMember crew )
239+ /// <summary>RemoveKerbalTrainingExp</summary>
240+ /// <param name="crew"></param>
241+ private void RemoveKerbalTrainingExp ( ProtoCrewMember crew )
242242 {
243243 foreach ( FlightLog . Entry entry in crew . careerLog . Entries . ToArray ( ) )
244244 if ( entry . type == "TrainingExp" )
@@ -248,10 +248,10 @@ private void RemoveKerbalTrainingExp(ProtoCrewMember crew)
248248 crew . flightLog . Entries . Remove ( entry ) ;
249249 }
250250
251- /// <summary>GetCrewTrainedLevel</summary>
252- /// <param name="crew"></param>
253- /// <returns></returns>
254- private int GetCrewTrainedLevel ( ProtoCrewMember crew )
251+ /// <summary>GetCrewTrainedLevel</summary>
252+ /// <param name="crew"></param>
253+ /// <returns></returns>
254+ private int GetCrewTrainedLevel ( ProtoCrewMember crew )
255255 {
256256 int lastLog = 0 ;
257257 FlightLog totalLog = crew . careerLog . CreateCopy ( ) ;
@@ -285,8 +285,8 @@ public override string GetInfo()
285285 if ( info == string . Empty )
286286 {
287287 info += Localizer . Format ( "#FTL-Agency-titl" ) ;
288- info += "\n \n <color=#FEDD00>" + Localizer . Format ( "#FTL-Agency-desc" ) + "\n " ;
289- info += "\n " + Localizer . Format ( "#FTL-nameV" , Version . SText ) ;
288+ info += "\n \n <color=#FEDD00>" + Localizer . Format ( "#FTL-Agency-desc" ) + "\n " ;
289+ info += "\n " + Localizer . Format ( "#FTL-nameV" , Version . SText ) ;
290290 info += "\n <color=#B4D455>" + Localizer . Format ( "#FTL-desc" ) ;
291291 info += "</color>\n \n " ;
292292 }
0 commit comments