Skip to content

Commit e60ff9d

Browse files
committed
Merge branch 'release/0.1.1'
2 parents fec1807 + 4f167a7 commit e60ff9d

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## v0.1.1
2+
##### Fix
3+
- Fix settings being loaded multiple times which would eventually cause the thermal overlays to fail.
4+
15
## v0.1.0
26
##### New
37
- Replace thermal overlay gradient colors with more intuitive scheme.

Source/EnhancedThermalData/Configuration/Config.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
namespace EnhancedThermalData.Configuration
1+
using System.Linq;
2+
using EnhancedThermalData.Diagnostics;
3+
4+
namespace EnhancedThermalData.Configuration
25
{
36
internal static class Config
47
{
@@ -17,16 +20,23 @@ public static EnhancedThermalDataNode Instance
1720
{
1821
var enhancedThermalDataNode = new EnhancedThermalDataNode();
1922
enhancedThermalDataNode.Load(
20-
GameDatabase.Instance.GetConfigNode("ENHANCED_THERMAL_DATA")
23+
GameDatabase.Instance.GetConfigNodes("ENHANCED_THERMAL_DATA").SingleOrDefault()
2124
);
2225

2326
_instance = enhancedThermalDataNode;
27+
28+
OnInitialLoad();
2429
}
2530
}
2631
}
2732

2833
return _instance;
2934
}
3035
}
36+
37+
private static void OnInitialLoad()
38+
{
39+
Log.Level = Instance.Diagnostics.LogLevel;
40+
}
3141
}
3242
}

Source/EnhancedThermalData/EnhancedThermalDataBehaviour.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,6 @@ public class EnhancedThermalDataBehaviour : MonoBehaviour
1717

1818
#region MonoBehaviour
1919

20-
// ReSharper disable once UnusedMember.Global
21-
public void Start()
22-
{
23-
Config.Instance.Load(GameDatabase
24-
.Instance
25-
.GetConfigNodes("ENHANCED_THERMAL_DATA")
26-
.FirstOrDefault()
27-
);
28-
29-
Log.Level = Config.Instance.Diagnostics.LogLevel;
30-
}
31-
3220
// ReSharper disable once UnusedMember.Global
3321
public void LateUpdate()
3422
{

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.0
1+
0.1.1

0 commit comments

Comments
 (0)