diff --git a/OpenRA.Game/ContentInstaller.cs b/OpenRA.Game/ContentInstaller.cs index 58c97afd83..49763093d2 100644 --- a/OpenRA.Game/ContentInstaller.cs +++ b/OpenRA.Game/ContentInstaller.cs @@ -15,9 +15,6 @@ namespace OpenRA // Referenced from ModMetadata, so needs to be in OpenRA.Game :( public class ContentInstaller : IGlobalModData { - public readonly string MenuWidget = null; - public readonly string MusicMenuWidget = null; - public readonly string BackgroundWidget = null; public readonly string[] TestFiles = { }; public readonly string[] DiskTestFiles = { }; public readonly string PackageToExtractFromCD = null; diff --git a/OpenRA.Mods.Common/LoadScreens/BlankLoadScreen.cs b/OpenRA.Mods.Common/LoadScreens/BlankLoadScreen.cs index f356025ac8..a2c17d1f5f 100644 --- a/OpenRA.Mods.Common/LoadScreens/BlankLoadScreen.cs +++ b/OpenRA.Mods.Common/LoadScreens/BlankLoadScreen.cs @@ -10,6 +10,7 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using OpenRA.FileFormats; using OpenRA.FileSystem; @@ -40,27 +41,13 @@ namespace OpenRA.Mods.Common.LoadScreens Ui.ResetAll(); Game.Settings.Save(); - // Check whether the mod content is installed - // TODO: The installation code has finally been beaten into shape, so we can - // finally move it all into the planned "Manage Content" panel in the modchooser mod. var installData = Game.ModData.Manifest.Get(); - var installModContent = !installData.TestFiles.All(f => GlobalFileSystem.Exists(f)); - var installModMusic = args != null && args.Contains("Install.Music"); + var isModContentInstalled = installData.TestFiles.All(f => GlobalFileSystem.Exists(Path.GetFileName(f))); - if (installModContent || installModMusic) + // Mod assets are missing! + if (!isModContentInstalled) { - var widgetArgs = new WidgetArgs() - { - { "continueLoading", () => Game.RunAfterTick(() => - Game.InitializeMod(Game.Settings.Game.Mod, args)) }, - }; - - if (installData.BackgroundWidget != null) - Ui.LoadWidget(installData.BackgroundWidget, Ui.Root, widgetArgs); - - var menu = installModContent ? installData.MenuWidget : installData.MusicMenuWidget; - Ui.OpenWindow(menu, widgetArgs); - + Game.InitializeMod("modchooser", new Arguments()); return; }