Ejemplo n.º 1
0
        public IEnumerable <ModImplementation> LoadMods()
        {
            var curDir = Environment.CurrentDirectory;
            var files  = Directory.GetFiles(curDir, FILE_EXT, SearchOption.AllDirectories);

            _logger.Debug($"Found {files.Length} mods! Starting load.\r\n{curDir}");
            foreach (var file in files)
            {
                var json = _config.LoadModJson(file);
                if (json == null)
                {
                    continue;
                }

                yield return(LoadMod(json, file));
            }
        }