diff --git a/OpenRA.Game/Manifest.cs b/OpenRA.Game/Manifest.cs index ee962e4e82..83429a3e2a 100644 --- a/OpenRA.Game/Manifest.cs +++ b/OpenRA.Game/Manifest.cs @@ -29,7 +29,7 @@ namespace OpenRA } } - // Describes what is to be loaded in order to run a mod + /// Describes what is to be loaded in order to run a mod. public class Manifest { public static readonly Dictionary AllMods = LoadMods(); @@ -106,12 +106,10 @@ namespace OpenRA RequiresMods = yaml["RequiresMods"].ToDictionary(my => my.Value); // Allow inherited mods to import parent maps. - var compat = new List(); - compat.Add(mod); + var compat = new List { Mod.Id }; if (yaml.ContainsKey("SupportsMapsFrom")) - foreach (var c in yaml["SupportsMapsFrom"].Value.Split(',')) - compat.Add(c.Trim()); + compat.AddRange(yaml["SupportsMapsFrom"].Value.Split(',').Select(c => c.Trim())); MapCompatibility = compat.ToArray(); @@ -198,6 +196,7 @@ namespace OpenRA static Dictionary LoadMods() { + // Get mods that are in the game folder. var basePath = Platform.ResolvePath(".", "mods"); var mods = Directory.GetDirectories(basePath) .Select(x => x.Substring(basePath.Length + 1));