private IList<ModPrototype> BuildPrototypes(IList<ModDefinition> defs, ModContainerOptions options) { List<ModPrototype> prototypes = new List<ModPrototype>(defs.Count); foreach (ModDefinition def in defs) { String path = Options.ModLocator.Locate(def, options.AllowZipMods); if (path == null) { throw new ModNotFoundException(def); } IFileSystem fileSystem = null; if (path.EndsWith(".zip", true, CultureInfo.CurrentCulture)) { FileStream fs = System.IO.File.OpenRead(path); fileSystem = SharpZipLibFileSystem.Open(fs); } else { } } return prototypes; }
internal ModPrototypeContainer(IList<ModDefinition> mods, ModContainerOptions options) { this.Mods = mods; this.Options = options; this.Prototypes = BuildPrototypes(mods, options); }