Skip to content

Commit 7559131

Browse files
committed
Fixing some merge errors
1 parent 0947325 commit 7559131

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

Source/ModuleManager/Cats/CatManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22
using UnityEngine;
3-
using K = KSPe.Util.Log;
3+
using K = KSPe.Util.Log;
44

55
namespace ModuleManager.Cats
66
{

Source/ModuleManager/MMPatchLoader.cs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ private void LoadPhysicsConfig()
245245
// Since it loaded the default config badly (sub node only) we clear it first
246246
physicsUrlFile.configs.Clear();
247247
// 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;
249250
physicsUrlFile.AddConfig(physicsContent);
250251
gameDataDir.files.Add(physicsUrlFile);
251252
}
@@ -324,13 +325,14 @@ private bool IsCacheUpToDate()
324325
bool useCache = false;
325326
if (SHA_CONFIG.IsLoadable)
326327
{
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"))
329331
{
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");
334336
useCache = CheckFilesChange(files, filesShaNode);
335337
useCache = useCache && storedSHA.Equals(configSha);
336338
useCache = useCache && version.Equals(Assembly.GetExecutingAssembly().GetName().Version.ToString());
@@ -483,7 +485,7 @@ private void SaveModdedTechTree(IEnumerable<IProtoUrlConfig> databaseConfigs)
483485
}
484486

485487
ConfigNode techNode = new ConfigNode(TECHTREE_CONFIG.Node.name);
486-
techNode.AddNode(configs.First().Node);
488+
techNode.AddData(configs.First().Node);
487489
TECHTREE_CONFIG.Save(techNode);
488490
}
489491

0 commit comments

Comments
 (0)