public static DataStructures.GameData.GameData GetGameDataFromFiles(IEnumerable<string> files) { var gd = new DataStructures.GameData.GameData(); foreach (var d in files.Select(GetGameDataFromFile)) { gd.MapSizeHigh = d.MapSizeHigh; gd.MapSizeLow = d.MapSizeLow; gd.Classes.AddRange(d.Classes); } gd.CreateDependencies(); gd.RemoveDuplicates(); return gd; }
public static DataStructures.GameData.GameData GetGameDataFromFiles(IEnumerable <string> files) { var gd = new DataStructures.GameData.GameData(); foreach (var d in files.Select(GetGameDataFromFile)) { gd.MapSizeHigh = d.MapSizeHigh; gd.MapSizeLow = d.MapSizeLow; gd.Classes.AddRange(d.Classes); gd.MaterialExclusions.AddRange(d.MaterialExclusions); } gd.CreateDependencies(); gd.RemoveDuplicates(); return(gd); }
public DataStructures.GameData.GameData GetGameDataFromFiles(IEnumerable <string> files) { var gd = new DataStructures.GameData.GameData(); foreach (var f in files.Where(IsValidForFile)) { var provider = new FgdProvider(); var d = provider.OpenFile(f); gd.MapSizeHigh = d.MapSizeHigh; gd.MapSizeLow = d.MapSizeLow; gd.Classes.AddRange(d.Classes); gd.MaterialExclusions.AddRange(d.MaterialExclusions); } gd.CreateDependencies(); gd.RemoveDuplicates(); return(gd); }