@@ -245,7 +245,8 @@ private void LoadPhysicsConfig()
245
245
// Since it loaded the default config badly (sub node only) we clear it first
246
246
physicsUrlFile . configs . Clear ( ) ;
247
247
// And reload it properly
248
- ConfigNode physicsContent = ConfigNode . Load ( PHYSICS_DEFAULT . Path ) ;
248
+ ConfigNode physicsContent = ConfigNode . Load ( PHYSICS_DEFAULT . Path ) ;
249
+ physicsContent . name = PHYSICS_NODE_NAME ;
249
250
physicsUrlFile . AddConfig ( physicsContent ) ;
250
251
gameDataDir . files . Add ( physicsUrlFile ) ;
251
252
}
@@ -324,13 +325,14 @@ private bool IsCacheUpToDate()
324
325
bool useCache = false ;
325
326
if ( SHA_CONFIG . IsLoadable )
326
327
{
327
- ConfigNode shaConfigNode = SHA_CONFIG . Node ;
328
- if ( shaConfigNode != null && shaConfigNode . HasValue ( "SHA" ) && shaConfigNode . HasValue ( "version" ) && shaConfigNode . HasValue ( "KSPVersion" ) )
328
+ SHA_CONFIG . Load ( ) ;
329
+ logger . Info ( "ConfigSHA loaded" ) ;
330
+ if ( SHA_CONFIG . Node != null && SHA_CONFIG . Node . HasValue ( "SHA" ) && SHA_CONFIG . Node . HasValue ( "version" ) && SHA_CONFIG . Node . HasValue ( "KSPVersion" ) )
329
331
{
330
- string storedSHA = shaConfigNode . GetValue ( "SHA" ) ;
331
- string version = shaConfigNode . GetValue ( "version" ) ;
332
- string kspVersion = shaConfigNode . GetValue ( "KSPVersion" ) ;
333
- ConfigNode filesShaNode = shaConfigNode . GetNode ( "FilesSHA" ) ;
332
+ string storedSHA = SHA_CONFIG . Node . GetValue ( "SHA" ) ;
333
+ string version = SHA_CONFIG . Node . GetValue ( "version" ) ;
334
+ string kspVersion = SHA_CONFIG . Node . GetValue ( "KSPVersion" ) ;
335
+ ConfigNode filesShaNode = SHA_CONFIG . Node . GetNode ( "FilesSHA" ) ;
334
336
useCache = CheckFilesChange ( files , filesShaNode ) ;
335
337
useCache = useCache && storedSHA . Equals ( configSha ) ;
336
338
useCache = useCache && version . Equals ( Assembly . GetExecutingAssembly ( ) . GetName ( ) . Version . ToString ( ) ) ;
@@ -483,7 +485,7 @@ private void SaveModdedTechTree(IEnumerable<IProtoUrlConfig> databaseConfigs)
483
485
}
484
486
485
487
ConfigNode techNode = new ConfigNode ( TECHTREE_CONFIG . Node . name ) ;
486
- techNode . AddNode ( configs . First ( ) . Node ) ;
488
+ techNode . AddData ( configs . First ( ) . Node ) ;
487
489
TECHTREE_CONFIG . Save ( techNode ) ;
488
490
}
489
491
0 commit comments