Exemplo n.º 1
0
        public List <DLC> LoadDLCs()
        {
            string dlcFolder = Path.Combine(user.GameDir, "DLC");

            logger.Info("Loading DLCs from " + dlcFolder);
            List <DLC> dlcs = dlcReader.ParseFolder(dlcFolder);

            UnzipDLCs(dlcs);

            foreach (DLC dlc in dlcs)
            {
                logger.Info("Loading portraits from DLC: " + dlc.Name);
                dlc.PortraitData = portraitReader.Parse(dlc.AbsolutePath);
            }
            return(dlcs);
        }
Exemplo n.º 2
0
        public IEnumerable <DLC> LoadDLCs(string gameDir, string dlcDir)
        {
            string dlcFolder = Path.Combine(gameDir, "DLC");

            logger.LogInformation("Loading DLCs from " + dlcFolder);

            foreach (DLC dlc in DLCReader.ParseFolder(dlcFolder))
            {
                UnzipDLC(dlcDir, dlc);

                logger.LogInformation("Loading portraits from DLC: " + dlc.Name);
                var reader = new PortraitReader(dlc.AbsolutePath);
                dlc.PortraitData = reader.Parse();

                yield return(dlc);
            }
        }