static void LoadMod (Mod mod, ModBase @base) { mod.enabled = true; mod.modBase = @base; @base.mod = mod; LoadModInternal(mod, @base); }
// modified versions of ModController.LoadMod/LoadModInternal static void LoadModInternal(Mod mod, ModBase @base) { ModController.CheckModBaseAndInfo(mod, @base); Mods.mods.Add(mod); ModController.SetupNoContent(mod); @base.OnLoad(); @base.SetTimesLoaded(@base.GetTimesLoaded() + 1); }
static void LoadMod (Assembly asm, JsonData info , Texture2D icon) { Mod m = new Mod(asm.Location); ModBase @base = ModController.InstantiateAndReturnTypes<ModBase>(asm).FirstOrDefault() ?? new ModBase(); m.SetModInfo(info); m.SetIcon(icon); ModController.LoadClasses(m); LoadMod(m, @base); }