File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff 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 ( ) ;
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ namespace PolyMod.Managers;
1818/// </summary>
1919public 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
You can’t perform that action at this time.
0 commit comments