Beispiel #1
0
 internal static void PreLoadMods()
 {
     foreach (var modid in loadOrder)
     {
         var mod = Mods[modid];
         try
         {
             EnumHolderResolver.RegisterAllEnums(mod.EntryType.Module);
             ConfigManager.PopulateConfigs(mod);
             mod.PreLoad();
             Console.Console.Reload += () =>
             {
                 SRMod.ForceModContext(mod);
                 foreach (var v in mod.Configs)
                 {
                     v.TryLoadFromFile();
                 }
                 SRMod.ClearModContext();
             };
         }
         catch (Exception e)
         {
             throw new Exception($"Error pre-loading mod '{modid}'!\n{e.GetType().Name}: {e}");
         }
     }
 }
Beispiel #2
0
 public static void PreLoadMods()
 {
     foreach (var mod in Mods)
     {
         try
         {
             EnumHolderResolver.RegisterAllEnums(mod.Value.EntryType.Module);
             mod.Value.PreLoad();
         }
         catch (Exception e)
         {
             throw new Exception($"Error pre-loading mod '{mod.Key}'!\n{e.GetType().Name}: {e.Message}");
         }
     }
 }
Beispiel #3
0
 internal static void PreLoadMods()
 {
     Console.Console.Reload += (Console.Console.ReloadAction)Main.ReLoad;
     foreach (var modid in loadOrder)
     {
         var mod = Mods[modid];
         try
         {
             EnumHolderResolver.RegisterAllEnums(mod.EntryType.Module);
             ConfigManager.PopulateConfigs(mod);
             mod.PreLoad();
         }
         catch (Exception e)
         {
             throw new Exception($"Error pre-loading mod '{modid}'!\n{e.GetType().Name}: {e}");
         }
     }
 }
Beispiel #4
0
 internal static void PreLoadMods()
 {
     CurrentLoadingStep      = LoadingStep.PRELOAD;
     Console.Console.Reload += Main.Reload;
     foreach (var modid in loadOrder)
     {
         var mod = Mods[modid];
         try
         {
             EnumHolderResolver.RegisterAllEnums(mod.EntryType.Module);
             ConfigManager.PopulateConfigs(mod);
             mod.PreLoad();
         }
         catch (Exception e)
         {
             throw new Exception($"Error pre-loading mod '{modid}'!\n{e.GetType().Name}: {e}");
         }
     }
     IdentifiableRegistry.CategorizeAllIds();
     GadgetRegistry.CategorizeAllIds();
 }