Remove RequiredMods logic.
This commit is contained in:
@@ -615,7 +615,6 @@
|
||||
<Compile Include="Widgets\Logic\Ingame\SupportPowerBinLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\Ingame\SupportPowerTooltipLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\Ingame\WorldTooltipLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\Installation\InstallModLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\Lobby\ClientTooltipLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\Lobby\KickClientLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\Lobby\KickSpectatorsLogic.cs" />
|
||||
|
||||
@@ -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<LabelWidget>("MOD_LIST").Text = text;
|
||||
|
||||
panel.Get<ButtonWidget>("BACK_BUTTON").OnClick = Ui.CloseWindow;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user