Skip to content

Commit 7a51f79

Browse files
committed
minor fix
1 parent 9260014 commit 7a51f79

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/Loader.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,9 @@ internal static void RegisterMods(Dictionary<string, Mod> mods)
323323
CheckDependencies(mods);
324324
}
325325

326-
internal static void LoadMods(Dictionary<string, Mod> mods)
326+
internal static void LoadMods(Dictionary<string, Mod> mods, out bool dependencyCycle)
327327
{
328-
var dependencyCycle = !SortMods(Registry.mods);
328+
dependencyCycle = !SortMods(Registry.mods);
329329
if (dependencyCycle) return;
330330

331331
StringBuilder checksumString = new();

src/Managers/Main.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ namespace PolyMod.Managers;
1818
/// </summary>
1919
public static class Main
2020
{
21+
internal static bool dependencyCycle;
22+
2123
/// <summary>
2224
/// The maximum tier for technology, used to extend the tech tree.
2325
/// </summary>
@@ -346,7 +348,8 @@ internal static void Init()
346348
);
347349
Registry.mods.Add(polytopia.id, new(polytopia, Mod.Status.Success, new()));
348350
Loader.RegisterMods(Registry.mods);
349-
Loader.LoadMods(Registry.mods);
351+
Loader.LoadMods(Registry.mods, out var cycle);
352+
dependencyCycle = cycle;
350353
stopwatch.Stop();
351354
}
352355

0 commit comments

Comments
 (0)