diff --git a/Makefile b/Makefile index 9d381cc05d..adc6c3af42 100644 --- a/Makefile +++ b/Makefile @@ -313,12 +313,11 @@ dependencies: $(os-dependencies) all-dependencies: cli-dependencies windows-dependencies osx-dependencies -version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/ts/mod.yaml mods/modchooser/mod.yaml mods/all/mod.yaml +version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/ts/mod.yaml mods/modcontent/mod.yaml mods/all/mod.yaml @for i in $? ; do \ awk '{sub("Version:.*$$","Version: $(VERSION)"); print $0}' $${i} > $${i}.tmp && \ - awk '{sub("\tmodchooser:.*$$","\tmodchooser: $(VERSION)"); print $0}' $${i}.tmp > $${i}.tmp2 && \ - awk '{sub("/[^/]*: User$$", "/$(VERSION): User"); print $0}' $${i}.tmp2 > $${i} && \ - rm $${i}.tmp $${i}.tmp2; \ + awk '{sub("/[^/]*: User$$", "/$(VERSION): User"); print $0}' $${i}.tmp > $${i} && \ + rm $${i}.tmp; \ done docs: utility mods version @@ -344,7 +343,7 @@ install-core: default @$(CP_R) mods/ra "$(DATA_INSTALL_DIR)/mods/" @$(CP_R) mods/d2k "$(DATA_INSTALL_DIR)/mods/" @$(INSTALL_PROGRAM) $(mod_d2k_TARGET) "$(DATA_INSTALL_DIR)/mods/d2k" - @$(CP_R) mods/modchooser "$(DATA_INSTALL_DIR)/mods/" + @$(CP_R) mods/modcontent "$(DATA_INSTALL_DIR)/mods/" @$(INSTALL_DATA) "global mix database.dat" "$(DATA_INSTALL_DIR)/global mix database.dat" @$(INSTALL_DATA) "GeoLite2-Country.mmdb.gz" "$(DATA_INSTALL_DIR)/GeoLite2-Country.mmdb.gz" @@ -382,8 +381,6 @@ install-linux-mime: @$(INSTALL_DIR) "$(DESTDIR)$(datadir)/applications" @$(INSTALL_DATA) packaging/linux/openra-join-servers.desktop "$(DESTDIR)$(datadir)/applications" - @$(INSTALL_DATA) packaging/linux/openra-replays.desktop "$(DESTDIR)$(datadir)/applications" - @$(INSTALL_DATA) packaging/linux/openra-launch-mod.desktop "$(DESTDIR)$(datadir)/applications" install-linux-appdata: @$(INSTALL_DIR) "$(DESTDIR)$(datadir)/appdata/" diff --git a/OpenRA.Game/FileSystem/FileSystem.cs b/OpenRA.Game/FileSystem/FileSystem.cs index b37cd3b638..f34f1534fa 100644 --- a/OpenRA.Game/FileSystem/FileSystem.cs +++ b/OpenRA.Game/FileSystem/FileSystem.cs @@ -50,8 +50,6 @@ namespace OpenRA.FileSystem return new ZipFile(this, filename); if (filename.EndsWith(".oramap", StringComparison.InvariantCultureIgnoreCase)) return new ZipFile(this, filename); - if (filename.EndsWith(".oramod", StringComparison.InvariantCultureIgnoreCase)) - return new ZipFile(this, filename); if (filename.EndsWith(".RS", StringComparison.InvariantCultureIgnoreCase)) return new D2kSoundResources(this, filename); if (filename.EndsWith(".Z", StringComparison.InvariantCultureIgnoreCase)) diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index 08552c0127..4f63e84d36 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -248,12 +248,12 @@ namespace OpenRA // Special case handling of Game.Mod argument: if it matches a real filesystem path // then we use this to override the mod search path, and replace it with the mod id - var modArgument = args.GetValue("Game.Mod", null); + var modID = args.GetValue("Game.Mod", null); var explicitModPaths = new string[0]; - if (modArgument != null && (File.Exists(modArgument) || Directory.Exists(modArgument))) + if (modID != null && (File.Exists(modID) || Directory.Exists(modID))) { - explicitModPaths = new[] { modArgument }; - args.ReplaceValue("Game.Mod", Path.GetFileNameWithoutExtension(modArgument)); + explicitModPaths = new[] { modID }; + modID = Path.GetFileNameWithoutExtension(modID); } InitializeSettings(args); @@ -317,7 +317,7 @@ namespace OpenRA var modSearchArg = args.GetValue("Engine.ModSearchPaths", null); var modSearchPaths = modSearchArg != null ? FieldLoader.GetValue("Engine.ModsPath", modSearchArg) : - new[] { Path.Combine(".", "mods"), Path.Combine("^", "mods") }; + new[] { Path.Combine(".", "mods") }; Mods = new InstalledMods(modSearchPaths, explicitModPaths); Console.WriteLine("Internal mods:"); @@ -330,19 +330,7 @@ namespace OpenRA foreach (var mod in ExternalMods) Console.WriteLine("\t{0}: {1} ({2})", mod.Key, mod.Value.Title, mod.Value.Version); - 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); + InitializeMod(modID, args); } public static void InitializeMod(string mod, Arguments args) @@ -372,12 +360,10 @@ namespace OpenRA ModData = null; - // Fall back to default if the mod doesn't exist or has missing prerequisites. - if (mod == null || !IsModInstalled(mod)) - mod = args.GetValue("Engine.DefaultMod", "modchooser"); + if (mod == null) + throw new InvalidOperationException("Game.Mod argument missing or mod could not be found."); Console.WriteLine("Loading mod: {0}", mod); - Settings.Game.Mod = mod; Sound.StopVideo(); diff --git a/OpenRA.Game/InstalledMods.cs b/OpenRA.Game/InstalledMods.cs index 78f8ebed49..c21f2d33da 100644 --- a/OpenRA.Game/InstalledMods.cs +++ b/OpenRA.Game/InstalledMods.cs @@ -53,9 +53,6 @@ namespace OpenRA var directory = new DirectoryInfo(resolved); foreach (var subdir in directory.EnumerateDirectories()) mods.Add(Pair.New(subdir.Name, subdir.FullName)); - - foreach (var file in directory.EnumerateFiles("*.oramod")) - mods.Add(Pair.New(Path.GetFileNameWithoutExtension(file.Name), file.FullName)); } catch (Exception e) { @@ -94,8 +91,6 @@ namespace OpenRA using (var bitmap = new Bitmap(stream)) icons[id] = sheetBuilder.Add(bitmap); - // Mods in the support directory and oramod packages (which are listed later - // in the CandidateMods list) override mods in the main install. return new Manifest(id, package); } catch (Exception) 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.Game/Settings.cs b/OpenRA.Game/Settings.cs index 464e7f2d3c..b46c7ce312 100644 --- a/OpenRA.Game/Settings.cs +++ b/OpenRA.Game/Settings.cs @@ -154,10 +154,6 @@ namespace OpenRA public class GameSettings { - [Desc("Load a specific mod on startup.")] - public string Mod = null; - public string PreviousMod = "ra"; - public string Platform = "Default"; public bool ViewportEdgeScroll = true; diff --git a/OpenRA.Mods.Common/LoadScreens/BlankLoadScreen.cs b/OpenRA.Mods.Common/LoadScreens/BlankLoadScreen.cs index 6f5eda33f0..6178e04f40 100644 --- a/OpenRA.Mods.Common/LoadScreens/BlankLoadScreen.cs +++ b/OpenRA.Mods.Common/LoadScreens/BlankLoadScreen.cs @@ -124,7 +124,7 @@ namespace OpenRA.Mods.Common.LoadScreens if (contentInstalled) return true; - Game.InitializeMod(content.ContentInstallerMod, new Arguments()); + Game.InitializeMod(content.ContentInstallerMod, new Arguments(new[] { "Content.Mod=" + modData.Manifest.Id })); return false; } } diff --git a/OpenRA.Mods.Common/LoadScreens/ModChooserLoadScreen.cs b/OpenRA.Mods.Common/LoadScreens/ModContentLoadScreen.cs similarity index 52% rename from OpenRA.Mods.Common/LoadScreens/ModChooserLoadScreen.cs rename to OpenRA.Mods.Common/LoadScreens/ModContentLoadScreen.cs index 69e5fa3e64..e860e65bc5 100644 --- a/OpenRA.Mods.Common/LoadScreens/ModChooserLoadScreen.cs +++ b/OpenRA.Mods.Common/LoadScreens/ModContentLoadScreen.cs @@ -9,14 +9,17 @@ */ #endregion +using System; using System.Collections.Generic; using System.Drawing; +using System.IO; +using System.Linq; using OpenRA.Graphics; using OpenRA.Widgets; namespace OpenRA.Mods.Common.LoadScreens { - public sealed class ModChooserLoadScreen : ILoadScreen + public sealed class ModContentLoadScreen : ILoadScreen { Sprite sprite; Rectangle bounds; @@ -46,10 +49,46 @@ namespace OpenRA.Mods.Common.LoadScreens public void StartGame(Arguments args) { - var widgetArgs = new WidgetArgs(); + var modId = args.GetValue("Content.Mod", null); + Manifest selectedMod; + if (modId == null || !Game.Mods.TryGetValue(modId, out selectedMod)) + throw new InvalidOperationException("Invalid or missing Content.Mod argument."); - Ui.LoadWidget("MODCHOOSER_BACKGROUND", Ui.Root, widgetArgs); - Ui.OpenWindow("MODCHOOSER_DIALOG", widgetArgs); + var content = selectedMod.Get(Game.ModData.ObjectCreator); + + Ui.LoadWidget("MODCONTENT_BACKGROUND", Ui.Root, new WidgetArgs()); + + if (!IsModInstalled(content)) + { + var widgetArgs = new WidgetArgs + { + { "continueLoading", () => + Game.RunAfterTick(() => Game.InitializeMod(modId, new Arguments())) }, + { "mod", selectedMod }, + { "content", content }, + }; + + Ui.OpenWindow("CONTENT_PROMPT_PANEL", widgetArgs); + } + else + { + var widgetArgs = new WidgetArgs + { + { "mod", selectedMod }, + { "content", content }, + { "onCancel", () => + Game.RunAfterTick(() => Game.InitializeMod(modId, new Arguments())) } + }; + + Ui.OpenWindow("CONTENT_PANEL", widgetArgs); + } + } + + bool IsModInstalled(ModContent content) + { + return content.Packages + .Where(p => p.Value.Required) + .All(p => p.Value.TestFiles.All(f => File.Exists(Platform.ResolvePath(f)))); } public void Dispose() diff --git a/OpenRA.Mods.Common/ModContent.cs b/OpenRA.Mods.Common/ModContent.cs index 5481875ced..9f32c42bcf 100644 --- a/OpenRA.Mods.Common/ModContent.cs +++ b/OpenRA.Mods.Common/ModContent.cs @@ -85,7 +85,7 @@ namespace OpenRA public readonly string InstallPromptMessage; public readonly string QuickDownload; public readonly string HeaderMessage; - public readonly string ContentInstallerMod = "modchooser"; + public readonly string ContentInstallerMod = "modcontent"; [FieldLoader.LoadUsing("LoadPackages")] public readonly Dictionary Packages = new Dictionary(); diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj index 6f0831a850..61f03891a0 100644 --- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj +++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj @@ -184,7 +184,7 @@ - + @@ -615,7 +615,6 @@ - @@ -633,7 +632,6 @@ - diff --git a/OpenRA.Mods.Common/UtilityCommands/CreateManPage.cs b/OpenRA.Mods.Common/UtilityCommands/CreateManPage.cs index 9c1a9a36ef..adcd0c28dc 100644 --- a/OpenRA.Mods.Common/UtilityCommands/CreateManPage.cs +++ b/OpenRA.Mods.Common/UtilityCommands/CreateManPage.cs @@ -31,7 +31,7 @@ namespace OpenRA.Mods.Common.UtilityCommands Console.WriteLine("openra \\- An Open Source modernization of the early 2D Command & Conquer games."); Console.WriteLine(".SH SYNOPSIS"); Console.WriteLine(".B openra"); - Console.WriteLine("[\\fB\\Game.Mod=\\fR\\fImodchooser\\fR]"); + Console.WriteLine("[\\fB\\Game.Mod=\\fR\\fIra\\fR]"); Console.WriteLine(".SH DESCRIPTION"); Console.WriteLine(".B openra"); Console.WriteLine("starts the game."); @@ -51,7 +51,7 @@ namespace OpenRA.Mods.Common.UtilityCommands Console.Write(".BR {0}.{1}=".F(section.Key, field.Name)); var value = field.GetValue(section.Value); - if (value != null && !value.ToString().StartsWith("System.")) + if (value != null && !value.ToString().StartsWith("System.", StringComparison.Ordinal)) Console.WriteLine("\\fI{0}\\fR".F(value)); else Console.WriteLine(); @@ -67,7 +67,7 @@ namespace OpenRA.Mods.Common.UtilityCommands Console.WriteLine(".SH BUGS"); Console.WriteLine("Known issues are tracked at http://bugs.openra.net"); Console.WriteLine(".SH COPYRIGHT"); - Console.WriteLine("Copyright 2007-2015 The OpenRA Developers (see AUTHORS)"); + Console.WriteLine("Copyright 2007-2017 The OpenRA Developers (see AUTHORS)"); Console.WriteLine("This manual is part of OpenRA, which is free software. It is GNU GPL v3 licensed. See COPYING for details."); } } 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/Installation/ModContentPromptLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Installation/ModContentPromptLogic.cs index f7f35b6ead..ab57f27801 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Installation/ModContentPromptLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Installation/ModContentPromptLogic.cs @@ -46,7 +46,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic { { "mod", mod }, { "content", content }, - { "onCancel", Ui.CloseWindow } + { "onCancel", () => { } } }); }; @@ -71,9 +71,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic }); }; - var backButton = panel.Get("BACK_BUTTON"); - backButton.Bounds.Y += headerHeight; - backButton.OnClick = Ui.CloseWindow; + var quitButton = panel.Get("QUIT_BUTTON"); + quitButton.Bounds.Y += headerHeight; + quitButton.OnClick = Game.Exit; Game.RunAfterTick(Ui.ResetTooltips); } } diff --git a/OpenRA.Mods.Common/Widgets/Logic/MainMenuLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/MainMenuLogic.cs index 7b98c42b00..b54119ff00 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/MainMenuLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/MainMenuLogic.cs @@ -87,14 +87,13 @@ namespace OpenRA.Mods.Common.Widgets.Logic }); }; - mainMenu.Get("MODS_BUTTON").OnClick = () => + mainMenu.Get("CONTENT_BUTTON").OnClick = () => { // Switching mods changes the world state (by disposing it), // so we can't do this inside the input handler. Game.RunAfterTick(() => { - Game.Settings.Game.PreviousMod = modData.Manifest.Id; - Game.InitializeMod("modchooser", null); + Game.InitializeMod("modcontent", new Arguments(new[] { "Content.Mod=" + modData.Manifest.Id })); }); }; @@ -288,7 +287,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic { // Send the mod and engine version to support version-filtered news (update prompts) newsURL += "?version={0}&mod={1}&modversion={2}".F( - Uri.EscapeUriString(Game.Mods["modchooser"].Metadata.Version), + Uri.EscapeUriString(Game.Mods["modcontent"].Metadata.Version), Uri.EscapeUriString(Game.ModData.Manifest.Id), Uri.EscapeUriString(Game.ModData.Manifest.Metadata.Version)); diff --git a/OpenRA.Mods.Common/Widgets/Logic/ModBrowserLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/ModBrowserLogic.cs deleted file mode 100644 index 12425f1af3..0000000000 --- a/OpenRA.Mods.Common/Widgets/Logic/ModBrowserLogic.cs +++ /dev/null @@ -1,225 +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; -using System.Collections.Generic; -using System.Drawing; -using System.IO; -using System.Linq; -using OpenRA.Graphics; -using OpenRA.Primitives; -using OpenRA.Widgets; - -namespace OpenRA.Mods.Common.Widgets.Logic -{ - public class ModBrowserLogic : ChromeLogic - { - readonly Widget modList; - readonly ButtonWidget modTemplate; - readonly Manifest[] allMods; - readonly Dictionary previews = new Dictionary(); - readonly Dictionary logos = new Dictionary(); - readonly Cache content = new Cache(LoadModContent); - - readonly Widget modChooserPanel; - readonly ButtonWidget loadButton; - readonly SheetBuilder sheetBuilder; - Manifest selectedMod; - string selectedAuthor; - string selectedDescription; - int modOffset = 0; - - static ModContent LoadModContent(Manifest mod) - { - return mod.Get(Game.ModData.ObjectCreator); - } - - [ObjectCreator.UseCtor] - public ModBrowserLogic(Widget widget, ModData modData) - { - modChooserPanel = widget; - loadButton = modChooserPanel.Get("LOAD_BUTTON"); - loadButton.OnClick = () => LoadMod(selectedMod); - loadButton.IsDisabled = () => selectedMod.Id == modData.Manifest.Id; - - var contentButton = modChooserPanel.Get("CONFIGURE_BUTTON"); - contentButton.OnClick = () => - { - var widgetArgs = new WidgetArgs - { - { "mod", selectedMod }, - { "content", content[selectedMod] }, - { "onCancel", () => { } } - }; - - Ui.OpenWindow("CONTENT_PANEL", widgetArgs); - }; - - modChooserPanel.Get("QUIT_BUTTON").OnClick = Game.Exit; - - modList = modChooserPanel.Get("MOD_LIST"); - modTemplate = modList.Get("MOD_TEMPLATE"); - - modChooserPanel.Get("MOD_DESC").GetText = () => selectedDescription; - modChooserPanel.Get("MOD_TITLE").GetText = () => selectedMod.Metadata.Title; - modChooserPanel.Get("MOD_AUTHOR").GetText = () => selectedAuthor; - modChooserPanel.Get("MOD_VERSION").GetText = () => selectedMod.Metadata.Version; - - var prevMod = modChooserPanel.Get("PREV_MOD"); - prevMod.OnClick = () => { modOffset -= 1; RebuildModList(); }; - prevMod.IsVisible = () => modOffset > 0; - - var nextMod = modChooserPanel.Get("NEXT_MOD"); - nextMod.OnClick = () => { modOffset += 1; RebuildModList(); }; - nextMod.IsVisible = () => modOffset + 5 < allMods.Length; - - modChooserPanel.Get("MOD_PREVIEW").GetSprite = () => - { - Sprite ret = null; - previews.TryGetValue(selectedMod.Id, out ret); - return ret; - }; - - sheetBuilder = new SheetBuilder(SheetType.BGRA); - allMods = Game.Mods.Values.Where(m => !m.Metadata.Hidden) - .OrderBy(m => m.Metadata.Title) - .ToArray(); - - // Load preview images, and eat any errors - foreach (var mod in allMods) - { - try - { - using (var stream = mod.Package.GetStream("preview.png")) - using (var preview = new Bitmap(stream)) - if (preview.Width == 296 && preview.Height == 196) - previews.Add(mod.Id, sheetBuilder.Add(preview)); - } - catch (Exception) { } - - try - { - using (var stream = mod.Package.GetStream("logo.png")) - using (var logo = new Bitmap(stream)) - if (logo.Width == 96 && logo.Height == 96) - logos.Add(mod.Id, sheetBuilder.Add(logo)); - } - catch (Exception) { } - } - - Manifest initialMod; - Game.Mods.TryGetValue(Game.Settings.Game.PreviousMod, out initialMod); - SelectMod(initialMod != null && initialMod.Id != "modchooser" ? initialMod : Game.Mods["ra"]); - - RebuildModList(); - } - - void RebuildModList() - { - modList.RemoveChildren(); - - var width = modTemplate.Bounds.Width; - var height = modTemplate.Bounds.Height; - var innerMargin = modTemplate.Bounds.Left; - var outerMargin = (modList.Bounds.Width - Math.Min(5, allMods.Length) * width - 4 * innerMargin) / 2; - var stride = width + innerMargin; - - for (var i = 0; i < 5; i++) - { - var j = i + modOffset; - if (j >= allMods.Length) - break; - - var mod = allMods[j]; - - var item = modTemplate.Clone() as ButtonWidget; - item.Bounds = new Rectangle(outerMargin + i * stride, 0, width, height); - item.IsHighlighted = () => selectedMod == mod; - item.OnClick = () => SelectMod(mod); - item.OnDoubleClick = () => LoadMod(mod); - item.OnKeyPress = e => - { - if (e.MultiTapCount == 2) - LoadMod(mod); - else - SelectMod(mod); - }; - - item.TooltipText = mod.Metadata.Title; - - if (j < 9) - item.Key = new Hotkey((Keycode)((int)Keycode.NUMBER_1 + j), Modifiers.None); - - Sprite logo = null; - logos.TryGetValue(mod.Id, out logo); - item.Get("MOD_LOGO").GetSprite = () => logo; - item.Get("MOD_NO_LOGO").IsVisible = () => logo == null; - - modList.AddChild(item); - } - } - - void SelectMod(Manifest mod) - { - selectedMod = mod; - selectedAuthor = "By " + (mod.Metadata.Author ?? "unknown author"); - selectedDescription = (mod.Metadata.Description ?? "").Replace("\\n", "\n"); - var selectedIndex = Array.IndexOf(allMods, mod); - if (selectedIndex - modOffset > 4) - modOffset = selectedIndex - 4; - } - - 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 - { - { "continueLoading", () => - Game.RunAfterTick(() => Game.InitializeMod(modId, new Arguments())) }, - { "mod", selectedMod }, - { "content", content[selectedMod] }, - }; - - Ui.OpenWindow("CONTENT_PROMPT_PANEL", widgetArgs); - - return; - } - - Game.RunAfterTick(() => - { - Ui.CloseWindow(); - sheetBuilder.Dispose(); - Game.InitializeMod(modId, null); - }); - } - - bool IsModInstalled(Manifest mod) - { - return content[mod].Packages - .Where(p => p.Value.Required) - .All(p => p.Value.TestFiles.All(f => File.Exists(Platform.ResolvePath(f)))); - } - } -} diff --git a/OpenRA.Mods.Common/Widgets/Logic/MultiplayerLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/MultiplayerLogic.cs index bc006f4f80..d78a241b85 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/MultiplayerLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/MultiplayerLogic.cs @@ -326,7 +326,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic }; var queryURL = services.ServerList + "games?version={0}&mod={1}&modversion={2}".F( - Uri.EscapeUriString(Game.Mods["modchooser"].Metadata.Version), + Uri.EscapeUriString(Game.Mods["modcontent"].Metadata.Version), Uri.EscapeUriString(Game.ModData.Manifest.Id), Uri.EscapeUriString(Game.ModData.Manifest.Metadata.Version)); diff --git a/OpenRA.Server/Program.cs b/OpenRA.Server/Program.cs index 00021e16f4..c5c8509ae5 100644 --- a/OpenRA.Server/Program.cs +++ b/OpenRA.Server/Program.cs @@ -30,14 +30,17 @@ namespace OpenRA.Server // Special case handling of Game.Mod argument: if it matches a real filesystem path // then we use this to override the mod search path, and replace it with the mod id - var modArgument = arguments.GetValue("Game.Mod", null); + var modID = arguments.GetValue("Game.Mod", null); var explicitModPaths = new string[0]; - if (modArgument != null && (File.Exists(modArgument) || Directory.Exists(modArgument))) + if (modID != null && (File.Exists(modID) || Directory.Exists(modID))) { - explicitModPaths = new[] { modArgument }; - arguments.ReplaceValue("Game.Mod", Path.GetFileNameWithoutExtension(modArgument)); + explicitModPaths = new[] { modID }; + modID = Path.GetFileNameWithoutExtension(modID); } + if (modID == null) + throw new InvalidOperationException("Game.Mod argument missing or mod could not be found."); + // HACK: The engine code assumes that Game.Settings is set. // This isn't nearly as bad as ModData, but is still not very nice. Game.InitializeSettings(arguments); @@ -46,18 +49,17 @@ namespace OpenRA.Server var envModSearchPaths = Environment.GetEnvironmentVariable("MOD_SEARCH_PATHS"); var modSearchPaths = !string.IsNullOrWhiteSpace(envModSearchPaths) ? FieldLoader.GetValue("MOD_SEARCH_PATHS", envModSearchPaths) : - new[] { Path.Combine(".", "mods"), Path.Combine("^", "mods") }; + new[] { Path.Combine(".", "mods") }; - var mod = Game.Settings.Game.Mod; var mods = new InstalledMods(modSearchPaths, explicitModPaths); // HACK: The engine code *still* assumes that Game.ModData is set - var modData = Game.ModData = new ModData(mods[mod], mods); + var modData = Game.ModData = new ModData(mods[modID], mods); modData.MapCache.LoadMaps(); settings.Map = modData.MapCache.ChooseInitialMap(settings.Map, new MersenneTwister()); - Console.WriteLine("[{0}] Starting dedicated server for mod: {1}", DateTime.Now.ToString(settings.TimestampFormat), mod); + Console.WriteLine("[{0}] Starting dedicated server for mod: {1}", DateTime.Now.ToString(settings.TimestampFormat), modID); while (true) { var server = new Server(new IPEndPoint(IPAddress.Any, settings.ListenPort), settings, modData, true); diff --git a/OpenRA.Utility/Program.cs b/OpenRA.Utility/Program.cs index 401f2a76fe..334ffbde8d 100644 --- a/OpenRA.Utility/Program.cs +++ b/OpenRA.Utility/Program.cs @@ -48,7 +48,7 @@ namespace OpenRA var envModSearchPaths = Environment.GetEnvironmentVariable("MOD_SEARCH_PATHS"); var modSearchPaths = !string.IsNullOrWhiteSpace(envModSearchPaths) ? FieldLoader.GetValue("MOD_SEARCH_PATHS", envModSearchPaths) : - new[] { Path.Combine(".", "mods"), Path.Combine("^", "mods") }; + new[] { Path.Combine(".", "mods") }; if (args.Length == 0) { diff --git a/make.ps1 b/make.ps1 index 176c670959..c829a8c789 100644 --- a/make.ps1 +++ b/make.ps1 @@ -74,16 +74,12 @@ function Version-Command if ($version -ne $null) { - $mods = @("mods/ra/mod.yaml", "mods/cnc/mod.yaml", "mods/d2k/mod.yaml", "mods/ts/mod.yaml", "mods/modchooser/mod.yaml", "mods/all/mod.yaml") + $mods = @("mods/ra/mod.yaml", "mods/cnc/mod.yaml", "mods/d2k/mod.yaml", "mods/ts/mod.yaml", "mods/modcontent/mod.yaml", "mods/all/mod.yaml") foreach ($mod in $mods) { $replacement = (gc $mod) -Replace "Version:.*", ("Version: {0}" -f $version) sc $mod $replacement - # The tab is a workaround for not replacing inside of "Packages:" - $replacement = (gc $mod) -Replace " modchooser:.*", (" modchooser: {0}" -f $version) - sc $mod $replacement - $prefix = $(gc $mod) | Where { $_.ToString().EndsWith(": User") } if ($prefix -and $prefix.LastIndexOf("/") -ne -1) { 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/chrome/mainmenu.yaml b/mods/cnc/chrome/mainmenu.yaml index e4e32ad134..92e9144580 100644 --- a/mods/cnc/chrome/mainmenu.yaml +++ b/mods/cnc/chrome/mainmenu.yaml @@ -78,12 +78,12 @@ Container@MENU_BACKGROUND: Width: 140 Height: 35 Text: Extras - Button@MODS_BUTTON: + Button@CONTENT_BUTTON: X: 600 Y: 0 Width: 140 Height: 35 - Text: Mods + Text: Manage Content Button@QUIT_BUTTON: X: 750 Y: 0 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/common/chrome/mainmenu.yaml b/mods/common/chrome/mainmenu.yaml index d03c893d16..db6ebe980f 100644 --- a/mods/common/chrome/mainmenu.yaml +++ b/mods/common/chrome/mainmenu.yaml @@ -70,12 +70,12 @@ Container@MAINMENU: Height: 30 Text: Extras Font: Bold - Button@MODS_BUTTON: + Button@CONTENT_BUTTON: X: PARENT_RIGHT/2-WIDTH/2 Y: 220 Width: 140 Height: 30 - Text: Mods + Text: Manage Content Font: Bold Button@QUIT_BUTTON: X: PARENT_RIGHT/2-WIDTH/2 diff --git a/mods/d2k/chrome/mainmenu.yaml b/mods/d2k/chrome/mainmenu.yaml index c5d368ea59..eafb423d12 100644 --- a/mods/d2k/chrome/mainmenu.yaml +++ b/mods/d2k/chrome/mainmenu.yaml @@ -57,12 +57,12 @@ Container@MAINMENU: Height: 30 Text: Extras Font: Bold - Button@MODS_BUTTON: + Button@CONTENT_BUTTON: X: PARENT_RIGHT/2-WIDTH/2 Y: 220 Width: 140 Height: 30 - Text: Mods + Text: Manage Content Font: Bold Button@QUIT_BUTTON: X: PARENT_RIGHT/2-WIDTH/2 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/modchooser.yaml b/mods/modchooser/modchooser.yaml deleted file mode 100644 index c4ce98d92f..0000000000 --- a/mods/modchooser/modchooser.yaml +++ /dev/null @@ -1,169 +0,0 @@ -Background@MODCHOOSER_BACKGROUND: - Background: background - Width: WINDOW_RIGHT - Height: WINDOW_BOTTOM - -Background@MODCHOOSER_DIALOG: - Logic: ModBrowserLogic - Children: - Container: - X: (WINDOW_RIGHT - WIDTH) / 2 - Y: (WINDOW_BOTTOM - 500) / 2 - Width: 750 - Height: 514 - Children: - Background@DIALOG_BACKGROUND: - Y: 69 - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - 69 - Background: panel-bg - Children: - Label: - X: 53 - Y: 30 - Align: Left - Font: MediumBold - Text: Choose your Battlefield: - Container@MOD_LIST: - X: 53 - Y: 60 - Width: PARENT_RIGHT-106 - Height: 150 - Children: - Button@MOD_TEMPLATE: - X: 16 - Width: 114 - Height: 114 - TooltipContainer: TOOLTIP_CONTAINER - IgnoreChildMouseOver: true - Children: - Container@MOD_NO_LOGO: - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Children: - Label@A: - Width: PARENT_RIGHT - Height: PARENT_BOTTOM-20 - Text: Missing or - Align: Center - Label@B: - Y: 20 - Width: PARENT_RIGHT - Height: PARENT_BOTTOM-20 - Text: invalid logo - Align: Center - RGBASprite@MOD_LOGO: - X: 9 - Y: 9 - Button@PREV_MOD: - X: 15 - Y: 85 - Width: 25 - Height: 64 - IgnoreChildMouseOver: true - Children: - Image: - X: 2 - ImageCollection: modchooser - ImageName: leftarrow - Button@NEXT_MOD: - X: PARENT_RIGHT - WIDTH - 20 - Y: 85 - Width: 25 - Height: 64 - IgnoreChildMouseOver: true - Children: - Image: - X: 3 - ImageCollection: modchooser - ImageName: rightarrow - Background@RULE: - X: 30 - Y: PARENT_BOTTOM - 249 - Width: PARENT_RIGHT - 60 - Height: 150 - Background: panel-rule - Label@MOD_TITLE: - X: PARENT_RIGHT - 400 - Y: PARENT_BOTTOM-220 - Align: Left - Font: Bold - Label@MOD_AUTHOR: - X: PARENT_RIGHT - 400 - Y: PARENT_BOTTOM-205 - Align: Left - Font: TinyBold - Label@MOD_VERSION: - X: PARENT_RIGHT - 400 - Y: PARENT_BOTTOM-192 - Align: Left - Font: Tiny - Label@MOD_DESC: - X: PARENT_RIGHT - 400 - Y: PARENT_BOTTOM-175 - Align: Left - VAlign: Top - Font: Tiny - Background@PREVIEW: - X: 30 - Y: PARENT_BOTTOM - 25 - HEIGHT - Width: 300 - Height: 200 - Background: panel-thinborder - Children: - Label: - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Text: Missing or invalid preview - Align: Center - RGBASprite@MOD_PREVIEW: - X: 2 - Y: 2 - Button@LOAD_BUTTON: - X: PARENT_RIGHT - 300 - WIDTH - Y: PARENT_BOTTOM - 25 - HEIGHT - Width: 100 - Height: 32 - Text: Play - Background: button-highlighted - Key: return - Button@CONFIGURE_BUTTON: - X: PARENT_RIGHT - 145 - WIDTH - Y: PARENT_BOTTOM - 25 - HEIGHT - Width: 140 - Height: 32 - Text: Manage Content - Background: button-highlighted - Button@QUIT_BUTTON: - X: PARENT_RIGHT - 30 - WIDTH - Y: PARENT_BOTTOM - 25 - HEIGHT - Width: 100 - Height: 32 - Text: Quit - Background: button-highlighted - Background@DIALOG_HEADER: - Width: PARENT_RIGHT - Height: 72 - Background: panel-header - Children: - Image: - X: (PARENT_RIGHT - WIDTH) / 2 - Y: 0-28 - Width: 280 - ImageCollection: modchooser - ImageName: logo - TooltipContainer@TOOLTIP_CONTAINER: - -Background@BUTTON_TOOLTIP: - Logic: ButtonTooltipLogic - Background: panel-thinborder - Height: 25 - Children: - Label@LABEL: - X: 5 - Height: 23 - Font: Bold - Label@HOTKEY: - TextColor: FFFF00 - Height: 23 - Font: Bold \ No newline at end of file diff --git a/mods/modchooser/chrome.png b/mods/modcontent/chrome.png similarity index 100% rename from mods/modchooser/chrome.png rename to mods/modcontent/chrome.png diff --git a/mods/modchooser/chrome.yaml b/mods/modcontent/chrome.yaml similarity index 99% rename from mods/modchooser/chrome.yaml rename to mods/modcontent/chrome.yaml index cea14509ba..58d2169d52 100644 --- a/mods/modchooser/chrome.yaml +++ b/mods/modcontent/chrome.yaml @@ -155,7 +155,7 @@ panel-rule: chrome.png background: chrome.png background:0,0,1024,480 -modchooser: chrome.png +modcontent: chrome.png logo: 0,576,280,128 leftarrow:384,512,20,64 rightarrow:404,512,20,64 diff --git a/mods/modchooser/content.yaml b/mods/modcontent/content.yaml similarity index 87% rename from mods/modchooser/content.yaml rename to mods/modcontent/content.yaml index 61cf774fb5..dfe0da4a39 100644 --- a/mods/modchooser/content.yaml +++ b/mods/modcontent/content.yaml @@ -56,7 +56,7 @@ Background@CONTENT_PANEL: Y: 1 Width: 20 Height: 20 - ImageCollection: modchooser + ImageCollection: modcontent ImageName: cdicon TooltipContainer: TOOLTIP_CONTAINER TooltipTemplate: DISC_TOOLTIP @@ -331,60 +331,31 @@ Background@CONTENT_PROMPT_PANEL: Height: 32 Text: Quick Install Font: Bold - Button@BACK_BUTTON: + Button@QUIT_BUTTON: X: PARENT_RIGHT - WIDTH - 30 Y: PARENT_BOTTOM - 52 Background: button-highlighted Width: 110 Height: 32 - Text: Back + Text: Quit Font: Bold Key: escape -Container@INSTALL_MOD_PANEL: - Logic: InstallModLogic - X: (WINDOW_RIGHT - WIDTH)/2 - Y: (WINDOW_BOTTOM - HEIGHT)/2 - Width: 500 - Height: 177 +Background@MODCONTENT_BACKGROUND: + Background: background + Width: WINDOW_RIGHT + Height: WINDOW_BOTTOM + +Background@BUTTON_TOOLTIP: + Logic: ButtonTooltipLogic + Background: panel-thinborder + Height: 25 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 + Label@LABEL: + X: 5 + Height: 23 + Font: Bold + Label@HOTKEY: + TextColor: FFFF00 + Height: 23 Font: Bold - Key: escape diff --git a/mods/modchooser/cursor.pal b/mods/modcontent/cursor.pal similarity index 100% rename from mods/modchooser/cursor.pal rename to mods/modcontent/cursor.pal diff --git a/mods/modchooser/cursor.shp b/mods/modcontent/cursor.shp similarity index 100% rename from mods/modchooser/cursor.shp rename to mods/modcontent/cursor.shp diff --git a/mods/modchooser/cursors.yaml b/mods/modcontent/cursors.yaml similarity index 100% rename from mods/modchooser/cursors.yaml rename to mods/modcontent/cursors.yaml diff --git a/mods/modchooser/metrics.yaml b/mods/modcontent/metrics.yaml similarity index 100% rename from mods/modchooser/metrics.yaml rename to mods/modcontent/metrics.yaml diff --git a/mods/modchooser/mod.yaml b/mods/modcontent/mod.yaml similarity index 68% rename from mods/modchooser/mod.yaml rename to mods/modcontent/mod.yaml index 4852b4eb75..9b0fae66a3 100644 --- a/mods/modchooser/mod.yaml +++ b/mods/modcontent/mod.yaml @@ -1,38 +1,35 @@ Metadata: - Title: Mod Chooser + Title: Mod Content Manager Version: {DEV_VERSION} Author: The OpenRA Developers Hidden: true -RequiresMods: - Packages: . - ./mods/modchooser: modchooser + ./mods/modcontent: modcontent ./mods/common: common Cursors: - modchooser|cursors.yaml + modcontent|cursors.yaml Chrome: - modchooser|chrome.yaml + modcontent|chrome.yaml Assemblies: common|OpenRA.Mods.Common.dll ChromeLayout: - modchooser|modchooser.yaml - modchooser|content.yaml + modcontent|content.yaml Notifications: - modchooser|notifications.yaml + modcontent|notifications.yaml -LoadScreen: ModChooserLoadScreen - Image: ./mods/modchooser/chrome.png +LoadScreen: ModContentLoadScreen + Image: ./mods/modcontent/chrome.png ChromeMetrics: common|metrics.yaml - modchooser|metrics.yaml + modcontent|metrics.yaml Fonts: Regular: diff --git a/mods/modchooser/notifications.yaml b/mods/modcontent/notifications.yaml similarity index 100% rename from mods/modchooser/notifications.yaml rename to mods/modcontent/notifications.yaml 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 diff --git a/packaging/linux/buildpackage.sh b/packaging/linux/buildpackage.sh index 38908d459b..ffd3191ad2 100755 --- a/packaging/linux/buildpackage.sh +++ b/packaging/linux/buildpackage.sh @@ -18,7 +18,7 @@ rm -rf $ROOTDIR cd ../.. # Copy files for OpenRA.Game.exe and OpenRA.Editor.exe as well as all dependencies. -make install-all prefix="/usr" DESTDIR="$PWD/packaging/linux/$ROOTDIR" +make install prefix="/usr" DESTDIR="$PWD/packaging/linux/$ROOTDIR" # Install startup scripts, desktop files and icons make install-linux-shortcuts prefix="/usr" DESTDIR="$PWD/packaging/linux/$ROOTDIR" diff --git a/packaging/linux/openra.appdata.xml b/packaging/linux/openra.appdata.xml index 24cb4006f9..9a5c215115 100644 --- a/packaging/linux/openra.appdata.xml +++ b/packaging/linux/openra.appdata.xml @@ -26,10 +26,6 @@ - http://www.openra.net/images/appdata/modchooser.png - Mod selection screen - - http://www.openra.net/images/appdata/ingame-ra.png Red Alert mod diff --git a/packaging/package-all.sh b/packaging/package-all.sh index 84ed6591ac..a77aeee678 100755 --- a/packaging/package-all.sh +++ b/packaging/package-all.sh @@ -33,7 +33,7 @@ markdown Lua-API.md > Lua-API.html # List of files that are packaged on all platforms FILES=('OpenRA.Game.exe' 'OpenRA.Game.exe.config' 'OpenRA.Utility.exe' 'OpenRA.Server.exe' 'OpenRA.Platforms.Default.dll' \ -'lua' 'glsl' 'mods/common' 'mods/ra' 'mods/cnc' 'mods/d2k' 'mods/modchooser' \ +'lua' 'glsl' 'mods/common' 'mods/ra' 'mods/cnc' 'mods/d2k' 'mods/modcontent' \ 'AUTHORS' 'COPYING' 'README.html' 'CONTRIBUTING.html' 'DOCUMENTATION.html' 'CHANGELOG.html' \ 'global mix database.dat' 'GeoLite2-Country.mmdb.gz') diff --git a/packaging/windows/OpenRA.nsi b/packaging/windows/OpenRA.nsi index 3412c2e4d7..92d6d382d8 100644 --- a/packaging/windows/OpenRA.nsi +++ b/packaging/windows/OpenRA.nsi @@ -79,7 +79,7 @@ Section "Game" GAME File /r "${SRCDIR}\mods\cnc" File /r "${SRCDIR}\mods\d2k" File /r "${SRCDIR}\mods\ra" - File /r "${SRCDIR}\mods\modchooser" + File /r "${SRCDIR}\mods\modcontent" SetOutPath "$INSTDIR" File "${SRCDIR}\OpenRA.exe" diff --git a/utility.cmd b/utility.cmd index 0b2c92b9df..2a471885df 100644 --- a/utility.cmd +++ b/utility.cmd @@ -7,12 +7,6 @@ call OpenRA.Utility.exe echo Enter --exit to exit set /P mod=Please enter a modname: OpenRA.Utility.exe if /I "%mod%" EQU "--exit" (exit) -if /I "%mod%" EQU "modchooser" ( -echo. -echo Sorry, this mod isn't available at the moment! -echo. -goto choosemod -) if /I "%mod%" EQU "ra" (goto help) if /I "%mod%" EQU "cnc" (goto help) if /I "%mod%" EQU "ts" (goto help)