Esempio 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);
        }
Esempio n. 2
0
 public BaseModWithId(BaseMod mod, string id)
 {
     this.mod = mod;
     this.id = id;
 }
Esempio n. 3
0
 public void UnloadMod(BaseMod mod)
 {
     modInstances.Remove (mod);
     mod.Initialize (null);
 }