internal static void UnloadModContent() { int i = 0; foreach (var mod in ModLoader.Mods.Reverse()) { try { if (Main.dedServ) { Console.WriteLine($"Unloading {mod.DisplayName}..."); } else { Interface.loadMods.SetCurrentMod(i++, mod.DisplayName); } mod.Close(); mod.UnloadContent(); } catch (Exception e) { e.Data["mod"] = mod.Name; throw; } finally { MonoModHooks.RemoveAll(mod); } } }
internal static void UnloadModContent() { foreach (var mod in ModLoader.Mods.Reverse()) { try { mod.UnloadContent(); } catch (Exception e) { e.Data["mod"] = mod.Name; throw; } finally { MonoModHooks.RemoveAll(mod); } } }