From 657ba90ae3d9fe72939818b69af19c17d06f450e Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Fri, 27 Jan 2017 16:50:50 +0000 Subject: [PATCH] Add Engine.DefaultMod argument to override modchooser fallback. --- OpenRA.Game/Game.cs | 4 ++-- OpenRA.Game/Settings.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index 50bb78bab7..5d7f52576d 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -368,8 +368,8 @@ namespace OpenRA ModData = null; // Fall back to default if the mod doesn't exist or has missing prerequisites. - if (!IsModInstalled(mod)) - mod = new GameSettings().Mod; + if (mod == null || !IsModInstalled(mod)) + mod = args.GetValue("Engine.DefaultMod", "modchooser"); Console.WriteLine("Loading mod: {0}", mod); Settings.Game.Mod = mod; diff --git a/OpenRA.Game/Settings.cs b/OpenRA.Game/Settings.cs index 9433a6b045..fdb85236b3 100644 --- a/OpenRA.Game/Settings.cs +++ b/OpenRA.Game/Settings.cs @@ -153,8 +153,8 @@ namespace OpenRA public class GameSettings { - [Desc("Load a specific mod on startup. Shipped ones include: ra, cnc and d2k")] - public string Mod = "modchooser"; + [Desc("Load a specific mod on startup.")] + public string Mod = null; public string PreviousMod = "ra"; public string Platform = "Default";