From 2af03da82509ba4edb744c856b50c5a16ed75313 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 28 Jan 2017 12:34:07 +0000 Subject: [PATCH] Add Engine.ModSearchPaths argument. --- OpenRA.Game/Game.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index d0f3c490f8..a7be84ea6c 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -314,7 +314,11 @@ namespace OpenRA GlobalChat = new GlobalChat(); - var modSearchPaths = new[] { Path.Combine(".", "mods"), Path.Combine("^", "mods") }; + var modSearchArg = args.GetValue("Engine.ModSearchPaths", null); + var modSearchPaths = modSearchArg != null ? + FieldLoader.GetValue("Engine.ModsPath", modSearchArg) : + new[] { Path.Combine(".", "mods"), Path.Combine("^", "mods") }; + Mods = new InstalledMods(modSearchPaths, explicitModPaths); Console.WriteLine("Internal mods:"); foreach (var mod in Mods)