diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index 08552c0127..522d087c47 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -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 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); diff --git a/OpenRA.Game/Manifest.cs b/OpenRA.Game/Manifest.cs index c85e94075f..33d1d7b55d 100644 --- a/OpenRA.Game/Manifest.cs +++ b/OpenRA.Game/Manifest.cs @@ -55,8 +55,6 @@ namespace OpenRA public readonly IReadOnlyDictionary Packages; public readonly IReadOnlyDictionary MapFolders; public readonly MiniYaml LoadScreen; - - public readonly Dictionary RequiresMods; public readonly Dictionary> 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 { Id }; diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj index 6f0831a850..431ab3c817 100644 --- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj +++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj @@ -615,7 +615,6 @@ - diff --git a/OpenRA.Mods.Common/Widgets/Logic/Installation/InstallModLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Installation/InstallModLogic.cs deleted file mode 100644 index 3698b82cc1..0000000000 --- a/OpenRA.Mods.Common/Widgets/Logic/Installation/InstallModLogic.cs +++ /dev/null @@ -1,31 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2017 The OpenRA Developers (see AUTHORS) - * This file is part of OpenRA, which is free software. It is made - * available to you under the terms of the GNU General Public License - * as published by the Free Software Foundation, either version 3 of - * the License, or (at your option) any later version. For more - * information, see COPYING. - */ -#endregion - -using System.Linq; -using OpenRA.Widgets; - -namespace OpenRA.Mods.Common.Widgets.Logic -{ - public class InstallModLogic : ChromeLogic - { - [ObjectCreator.UseCtor] - public InstallModLogic(Widget widget, Manifest mod) - { - var panel = widget.Get("INSTALL_MOD_PANEL"); - - var mods = mod.RequiresMods.Where(m => !Game.IsModInstalled(m)).Select(m => "{0} ({1})".F(m.Key, m.Value)); - var text = string.Join(", ", mods); - panel.Get("MOD_LIST").Text = text; - - panel.Get("BACK_BUTTON").OnClick = Ui.CloseWindow; - } - } -} diff --git a/OpenRA.Mods.Common/Widgets/Logic/ModBrowserLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/ModBrowserLogic.cs index 12425f1af3..d6e2e07f3e 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/ModBrowserLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/ModBrowserLogic.cs @@ -180,18 +180,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic void LoadMod(Manifest mod) { var modId = mod.Id; - if (!Game.IsModInstalled(modId)) - { - var widgetArgs = new WidgetArgs - { - { "mod", selectedMod }, - { "content", content[selectedMod] }, - }; - - Ui.OpenWindow("INSTALL_MOD_PANEL", widgetArgs); - return; - } - if (!IsModInstalled(mod)) { var widgetArgs = new WidgetArgs diff --git a/mods/all/mod.yaml b/mods/all/mod.yaml index decae77587..6868263f07 100644 --- a/mods/all/mod.yaml +++ b/mods/all/mod.yaml @@ -5,8 +5,6 @@ Metadata: Hidden: true Description: Depending on all DLLs. -RequiresMods: - Packages: . diff --git a/mods/cnc/mod.yaml b/mods/cnc/mod.yaml index 086f0ffe89..d4218c8d09 100644 --- a/mods/cnc/mod.yaml +++ b/mods/cnc/mod.yaml @@ -4,9 +4,6 @@ Metadata: Version: {DEV_VERSION} Author: the OpenRA Developers -RequiresMods: - modchooser: {DEV_VERSION} - Packages: ~^Content/cnc ~^Content/cnc/movies diff --git a/mods/d2k/mod.yaml b/mods/d2k/mod.yaml index dfe62bd6b0..398b7197c3 100644 --- a/mods/d2k/mod.yaml +++ b/mods/d2k/mod.yaml @@ -4,9 +4,6 @@ Metadata: Version: {DEV_VERSION} Author: the OpenRA Developers -RequiresMods: - modchooser: {DEV_VERSION} - Packages: ~^Content/d2k/v2/ ~^Content/d2k/v2/GAMESFX diff --git a/mods/modchooser/content.yaml b/mods/modchooser/content.yaml index 61cf774fb5..0acf4b8f92 100644 --- a/mods/modchooser/content.yaml +++ b/mods/modchooser/content.yaml @@ -340,51 +340,3 @@ Background@CONTENT_PROMPT_PANEL: Text: Back Font: Bold Key: escape - -Container@INSTALL_MOD_PANEL: - Logic: InstallModLogic - X: (WINDOW_RIGHT - WIDTH)/2 - Y: (WINDOW_BOTTOM - HEIGHT)/2 - Width: 500 - Height: 177 - Children: - Background: - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Background: panel-bg - Background@RULE: - X: 30 - Y: 50 - Width: 440 - Height: 150 - Background: panel-rule - Label@TITLE: - X: 0 - Y: 12 - Width: PARENT_RIGHT - Height: 25 - Text: Missing dependencies - Align: Center - Font: MediumBold - Label@DESC: - X: 0 - Y: 65 - Width: PARENT_RIGHT - Height: 25 - Align: Center - Text: Please fully install the following mods then try again: - Label@MOD_LIST: - X: 0 - Y: 85 - Width: PARENT_RIGHT - Height: 25 - Align: Center - Button@BACK_BUTTON: - X: PARENT_RIGHT - 130 - Y: PARENT_BOTTOM - 52 - Background: button-highlighted - Width: 110 - Height: 32 - Text: Back - Font: Bold - Key: escape diff --git a/mods/modchooser/mod.yaml b/mods/modchooser/mod.yaml index 4852b4eb75..9f57c94f9d 100644 --- a/mods/modchooser/mod.yaml +++ b/mods/modchooser/mod.yaml @@ -4,8 +4,6 @@ Metadata: Author: The OpenRA Developers Hidden: true -RequiresMods: - Packages: . ./mods/modchooser: modchooser diff --git a/mods/ra/mod.yaml b/mods/ra/mod.yaml index f2f11415d1..9208c9b565 100644 --- a/mods/ra/mod.yaml +++ b/mods/ra/mod.yaml @@ -4,9 +4,6 @@ Metadata: Version: {DEV_VERSION} Author: the OpenRA Developers -RequiresMods: - modchooser: {DEV_VERSION} - Packages: ~^Content/ra/v2/ ~^Content/ra/v2/expand diff --git a/mods/ts/mod.yaml b/mods/ts/mod.yaml index cece39ae1b..543280aaba 100644 --- a/mods/ts/mod.yaml +++ b/mods/ts/mod.yaml @@ -4,9 +4,6 @@ Metadata: Version: {DEV_VERSION} Author: the OpenRA Developers -RequiresMods: - modchooser: {DEV_VERSION} - Packages: ~^Content/ts ~^Content/ts/firestorm