Ejemplo n.º 1
0
        public string OwnFolder(BaseMod mod)
        {
            String installpath = null;

            foreach (String id in loader.modInstances.Keys) {
                if (loader.modInstances [id].Equals (mod))
                    installpath = (loader.modManager.installedMods.Find (delegate(Item lmod) {
                        return ((lmod as LocalMod).localId.Equals (id));
                    }) as LocalMod).installPath;
            }

            if (installpath == null && currentlyLoading != null)
                return Path.GetDirectoryName(currentlyLoading.installPath);
            if (installpath == null)
                return Platform.getModLoaderPath() + Path.DirectorySeparatorChar + "mods" + Path.DirectorySeparatorChar + "Unknown" + Path.DirectorySeparatorChar;
            return Path.GetDirectoryName(installpath);
        }
Ejemplo n.º 2
0
 public BaseModWithId(BaseMod mod, string id)
 {
     this.mod = mod;
     this.id = id;
 }
Ejemplo n.º 3
0
 public void UnloadMod(BaseMod mod)
 {
     modInstances.Remove (mod);
     mod.Initialize (null);
 }