Exemplo n.º 1
0
 public LibraryRelatedMod(string name, DependenciesFile file, List <Assembly> checkerAssemblies)
 {
     this.name = name;
     this.file = file;
     this.checkerAssemblies = checkerAssemblies;
     //isLibrary = name == LibraryModName;
 }
Exemplo n.º 2
0
        private List <LibraryRelatedMod> EnumerateLibraryRelatedMods()
        {
            var checkerTypeName = typeof(DependencyChecker).FullName;
            var relatedMods     = new List <LibraryRelatedMod>();

            foreach (var modContentPack in LoadedModManager.RunningMods)
            {
                var versionFile       = DependenciesFile.TryParseVersionFile(modContentPack);
                var checkerAssemblies = modContentPack.assemblies.loadedAssemblies.Where(a => a.GetType(checkerTypeName, false) != null).ToList();
                if (checkerAssemblies.Count > 0 || versionFile != null)
                {
                    if (versionFile == null)
                    {
                        Log.Warning("Couldn't parse version file for " + modContentPack.Name);
                    }
                    relatedMods.Add(new LibraryRelatedMod(modContentPack.Name, versionFile, checkerAssemblies));
                }
            }
            return(relatedMods);
        }