Esempio n. 1
0
		static void LoadMod        (Mod      mod, ModBase  @base)
		{
			mod.enabled = true;

			mod.modBase = @base;
			@base.mod = mod;

			LoadModInternal(mod, @base);
		}
Esempio n. 2
0
		// 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);
		}
Esempio n. 3
0
		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);
		}