@@ -85,7 +85,7 @@ private void Start()
8585 GameEvents . onGameSceneLoadRequested . Add ( this . onGameSceneLoadRequested ) ;
8686 GameEvents . onLevelWasLoaded . Add ( this . onLevelWasLoaded ) ;
8787
88- StartCoroutine ( ReloadConfig ( ) ) ;
88+ StartCoroutine ( ReloadConfigWhenTimeWarpReady ( ) ) ;
8989
9090 Log . Trace ( "method end" , logCaller ) ;
9191 }
@@ -134,18 +134,20 @@ private void onLevelWasLoaded(GameScenes gs)
134134
135135 private void onHideUI ( )
136136 {
137- string logCaller = "onHideUI" ;
137+ string logCaller = "Settings. onHideUI" ;
138138 Log . Trace ( "method start" , logCaller ) ;
139139
140+ Log . Info ( "Hiding GUI for Settings Lock" , logCaller ) ;
140141 TempHideGUI ( "Settings" ) ;
141142
142143 Log . Trace ( "method end" , logCaller ) ;
143144 }
144145 private void onShowUI ( )
145146 {
146- string logCaller = "onShowUI" ;
147+ string logCaller = "Settings. onShowUI" ;
147148 Log . Trace ( "method start" , logCaller ) ;
148149
150+ Log . Info ( "Unhiding GUI for Settings Lock" , logCaller ) ;
149151 TempUnHideGUI ( "Settings" ) ;
150152
151153 Log . Trace ( "method end" , logCaller ) ;
@@ -155,21 +157,40 @@ private void onShowUI()
155157
156158
157159 #region Coroutines
158- public IEnumerator ReloadConfig ( )
160+ public IEnumerator ReloadConfigWhenTimeWarpReady ( )
159161 {
162+ string logCaller = "Settings.ReloadConfig" ;
163+ Log . Trace ( "coroutine start" , logCaller ) ;
164+
160165 while ( TimeWarp . fetch == null )
161166 yield return null ;
162167
168+ ResetConfigs ( ) ;
169+
170+ Log . Trace ( "coroutine end" , logCaller ) ;
171+ yield break ;
172+ }
173+
174+ private void ResetConfigs ( )
175+ {
176+ string logCaller = "Settings.ResetConfigs" ;
177+ Log . Trace ( "method start" , logCaller ) ;
178+
163179 resetKeyBindingsToDefault ( ) ;
164180 resetWarpRatesToDefault ( ) ;
165181 resetAltitudeLimitsToDefault ( ) ;
166182 loadConfig ( ) ;
167183 warpLevels = customWarpRates . Count ;
168184
169185 IsReady = configLoadSuccessful ;
186+ if ( IsReady )
187+ Log . Info ( "TimeController.Settings is Ready!" , logCaller ) ;
188+ else
189+ Log . Error ( "Something went wrong loading the time controller settings!" , logCaller ) ;
170190
171- yield break ;
191+ Log . Trace ( "method end" , logCaller ) ;
172192 }
193+
173194 #endregion
174195 #region Key Bindings
175196 private void resetKeyBindingsToDefault ( )
@@ -238,8 +259,15 @@ private void configLoadKeyBinds(ConfigNode cn)
238259 Log . Warning ( "Key combination is not defined correctly: " + keycombo + " - Using default for user action " + userAction , logCaller ) ;
239260 continue ;
240261 }
241- k . KeyCombination = new List < KeyCode > ( iekc ) ;
242- k . KeyCombinationString = keycombo ;
262+ if ( iekc . Contains ( KeyCode . None ) )
263+ {
264+ k . KeyCombination = new List < KeyCode > ( ) ;
265+ }
266+ else
267+ {
268+ k . KeyCombination = new List < KeyCode > ( iekc ) ;
269+ k . KeyCombinationString = keycombo ;
270+ }
243271 }
244272 }
245273
@@ -1082,9 +1110,9 @@ public bool ShowScreenMessages {
10821110 return showScreenMessages ;
10831111 }
10841112 set {
1085- if ( visible != value )
1113+ if ( showScreenMessages != value )
10861114 {
1087- visible = value ;
1115+ showScreenMessages = value ;
10881116 OnPropertyChanged ( PropertyStrings . ShowScreenMessages ) ;
10891117 SetNeedsSavedFlag ( ) ;
10901118 }
0 commit comments