public PatchModsMenu(TypeDefinitionCollection types, ModLoader loader) : base(types) { this.loader = loader; this.modManager = this.loader.modManager; this.repoManager = modManager.repoManager; }
public RepoManager(ModManager modManager) { this.modManager = modManager; //add repos this.readRepository("http://mods.Scrollsguide.com/"); //load repo list String installPath = Platform.getGlobalScrollsInstallPath(); String modLoaderPath = installPath + "ModLoader" + System.IO.Path.DirectorySeparatorChar; if (!File.Exists(modLoaderPath + "repo.ini")) { File.CreateText(modLoaderPath + "repo.ini").Close(); } String[] repos = File.ReadAllLines(modLoaderPath + "repo.ini"); foreach (String repo in repos) { this.readRepository(repo); } }
public RepoManager(ModManager modManager) { Platform.ErrorLog("repomanager creator"); this.modManager = modManager; Platform.ErrorLog("read scrollsguide + nohero"); //add repos try { //this.readRepository ("http://mods.Scrollsguide.com/");//will readd this when the mods are updated!!! this.readRepository("https://raw.github.com/noHero123/minirepo/master"); this.readRepository("https://raw.github.com/dga711/dgarepo/master/"); } catch { } //load repo list String installPath = Platform.getGlobalScrollsInstallPath(); String modLoaderPath = Platform.getModsPath() + System.IO.Path.DirectorySeparatorChar; //.getModLoaderPath() if (!File.Exists(modLoaderPath + "repo.ini")) { File.CreateText(modLoaderPath + "repo.ini").Close(); } String[] repos = File.ReadAllLines(modLoaderPath + "repo.ini"); Platform.ErrorLog("read repos in list"); foreach (String repo in repos) { try { this.readRepository(repo); } catch { } } Platform.ErrorLog("repomanager creator end"); }
public RepoManager(ModManager modManager) { this.modManager = modManager; //add repos this.readRepository ("http://mods.Scrollsguide.com/"); //load repo list String installPath = Platform.getGlobalScrollsInstallPath(); String modLoaderPath = installPath + "ModLoader" + System.IO.Path.DirectorySeparatorChar; if (!File.Exists (modLoaderPath+"repo.ini")) { File.CreateText (modLoaderPath+"repo.ini").Close(); } String[] repos = File.ReadAllLines (modLoaderPath+"repo.ini"); foreach (String repo in repos) this.readRepository(repo); }
public ModLoader() { modLoaderPath = Platform.getGlobalScrollsInstallPath() + System.IO.Path.DirectorySeparatorChar + "ModLoader" + System.IO.Path.DirectorySeparatorChar; //load installed mods modManager = new ModManager (this); //load order list if (!File.Exists (modLoaderPath+"mods.ini")) { File.CreateText (modLoaderPath+"mods.ini").Close(); //first launch, set hooks for patches this.queueRepatch(); } modOrder = File.ReadAllLines (modLoaderPath+"mods.ini").ToList(); //match order with installed mods foreach (LocalMod mod in modManager.installedMods) { if (mod.enabled) if (!modOrder.Contains (mod.localId)) modOrder.Add (mod.localId); } //clean up not available mods foreach (String id in modOrder.ToArray()) { if (modManager.installedMods.Find (delegate(Item mod) { return ((mod as LocalMod).localId.Equals (id)); }) == null) modOrder.Remove (id); } //get Scrolls Types list TypeDefinitionCollection types = AssemblyFactory.GetAssembly (modLoaderPath+"Assembly-CSharp.dll").MainModule.Types; //get ModAPI publicAPI = new APIHandler (this); //loadPatches this.loadPatches (types); //loadModsStatic this.loadModsStatic (types); //repatch this.repatchIfNeeded (); Console.WriteLine ("------------------------------"); Console.WriteLine ("ModLoader Hooks:"); ScrollsFilter.Log (); Console.WriteLine ("------------------------------"); }
public ModLoader() { modLoaderPath = Platform.getGlobalScrollsInstallPath() + System.IO.Path.DirectorySeparatorChar + "ModLoader" + System.IO.Path.DirectorySeparatorChar; //load installed mods modManager = new ModManager(this); //load order list if (!File.Exists(modLoaderPath + "mods.ini")) { File.CreateText(modLoaderPath + "mods.ini").Close(); //first launch, set hooks for patches this.queueRepatch(); } modOrder = File.ReadAllLines(modLoaderPath + "mods.ini").ToList(); //match order with installed mods foreach (LocalMod mod in modManager.installedMods) { if (mod.enabled) { if (!modOrder.Contains(mod.localId)) { modOrder.Add(mod.localId); } } } //clean up not available mods foreach (String id in modOrder.ToArray()) { if (modManager.installedMods.Find(delegate(Item mod) { return((mod as LocalMod).localId.Equals(id)); }) == null) { modOrder.Remove(id); } } //get Scrolls Types list TypeDefinitionCollection types = AssemblyFactory.GetAssembly(modLoaderPath + "Assembly-CSharp.dll").MainModule.Types; //get ModAPI publicAPI = new APIHandler(this); //loadPatches this.loadPatches(types); //loadModsStatic this.loadModsStatic(types); //repatch this.repatchIfNeeded(); Console.WriteLine("------------------------------"); Console.WriteLine("ModLoader Hooks:"); ScrollsFilter.Log(); Console.WriteLine("------------------------------"); }
public RepoManager(ModManager modManager) { Platform.ErrorLog("repomanager creator"); this.modManager = modManager; Platform.ErrorLog("read scrollsguide + nohero"); //add repos try { //this.readRepository ("http://mods.Scrollsguide.com/");//will readd this when the mods are updated!!! this.readRepository ("https://raw.github.com/noHero123/minirepo/master"); this.readRepository ("https://raw.github.com/dga711/dgarepo/master/"); } catch { } //load repo list String installPath = Platform.getGlobalScrollsInstallPath(); String modLoaderPath = Platform.getModsPath() + System.IO.Path.DirectorySeparatorChar;//.getModLoaderPath() if (!File.Exists (modLoaderPath+"repo.ini")) { File.CreateText (modLoaderPath+"repo.ini").Close(); } String[] repos = File.ReadAllLines (modLoaderPath+"repo.ini"); Platform.ErrorLog("read repos in list"); foreach (String repo in repos) { try { this.readRepository (repo); } catch { } } Platform.ErrorLog("repomanager creator end"); }