Skip to content

Commit ef4535e

Browse files
committed
Somewhat better handling when someone changes Tech Tree or Physics.
1 parent eb4edf3 commit ef4535e

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Source/ModuleManager/CustomConfigsManager.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,24 @@ internal void Start()
1919
Log(TECHTREE_CONFIG.Path);
2020
Log(TECHTREE_CONFIG.IsLoadable.ToString());
2121
#endif
22-
if (!start_techtree_loaded && TECHTREE_CONFIG.IsLoadable)
22+
if (start_techtree_loaded)
23+
{
24+
if (HighLogic.CurrentGame.Parameters.Career.TechTreeUrl != TECHTREE_CONFIG.KspPath)
25+
Log(string.Format("Tech tree was changed by third party to [{0}].", HighLogic.CurrentGame.Parameters.Career.TechTreeUrl));
26+
}
27+
else if (TECHTREE_CONFIG.IsLoadable)
2328
{
2429
Log("Setting modded tech tree as the active one");
2530
HighLogic.CurrentGame.Parameters.Career.TechTreeUrl = TECHTREE_CONFIG.KspPath;
2631
start_techtree_loaded = true;
2732
}
2833

29-
if (!start_physics_loaded && PHYSICS_CONFIG.IsLoadable)
34+
if (start_physics_loaded)
35+
{
36+
if (PhysicsGlobals.PhysicsDatabaseFilename != PHYSICS_CONFIG.Path)
37+
Log(string.Format("Physics changed by third party to [{0}].", PhysicsGlobals.PhysicsDatabaseFilename));
38+
}
39+
else if (PHYSICS_CONFIG.IsLoadable)
3040
{
3141
Log("Setting modded physics as the active one");
3242
PhysicsGlobals.PhysicsDatabaseFilename = PHYSICS_CONFIG.Path;

0 commit comments

Comments
 (0)