Remove RequiredMods logic.

This commit is contained in:
Paul Chote
2017-04-01 21:48:38 +00:00
parent 43b9aa00d8
commit 5d5fd7a0e8
12 changed files with 2 additions and 126 deletions

View File

@@ -333,18 +333,6 @@ namespace OpenRA
InitializeMod(Settings.Game.Mod, args);
}
public static bool IsModInstalled(string modId)
{
return Mods.ContainsKey(modId) && Mods[modId].RequiresMods.All(IsModInstalled);
}
public static bool IsModInstalled(KeyValuePair<string, string> mod)
{
return Mods.ContainsKey(mod.Key)
&& Mods[mod.Key].Metadata.Version == mod.Value
&& IsModInstalled(mod.Key);
}
public static void InitializeMod(string mod, Arguments args)
{
// Clear static state if we have switched mods
@@ -372,8 +360,8 @@ namespace OpenRA
ModData = null;
// Fall back to default if the mod doesn't exist or has missing prerequisites.
if (mod == null || !IsModInstalled(mod))
// Fall back to default if the mod doesn't exist
if (mod == null)
mod = args.GetValue("Engine.DefaultMod", "modchooser");
Console.WriteLine("Loading mod: {0}", mod);

View File

@@ -55,8 +55,6 @@ namespace OpenRA
public readonly IReadOnlyDictionary<string, string> Packages;
public readonly IReadOnlyDictionary<string, string> MapFolders;
public readonly MiniYaml LoadScreen;
public readonly Dictionary<string, string> RequiresMods;
public readonly Dictionary<string, Pair<string, int>> Fonts;
public readonly string[] SoundFormats = { };
@@ -115,8 +113,6 @@ namespace OpenRA
return Pair.New(nd["Font"].Value, Exts.ParseIntegerInvariant(nd["Size"].Value));
});
RequiresMods = yaml["RequiresMods"].ToDictionary(my => my.Value);
// Allow inherited mods to import parent maps.
var compat = new List<string> { Id };