Merge pull request #3903 from Mailaender/gameinit-redundancy
Removed the now redundant per mod Install/DownloadPackagesLogic
This commit is contained in:
@@ -400,7 +400,6 @@
|
||||
<Compile Include="Widgets\Logic\OrderButtonsChromeLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\PerfDebugLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\RAInstallFromCDLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\RAInstallLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\ReplayBrowserLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\ServerBrowserLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\ServerCreationLogic.cs" />
|
||||
@@ -471,6 +470,7 @@
|
||||
<Compile Include="AI\States\GroundStates.cs" />
|
||||
<Compile Include="AI\States\ProtectionStates.cs" />
|
||||
<Compile Include="AI\States\AirStates.cs" />
|
||||
<Compile Include="Widgets\Logic\InstallLogic.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
||||
|
||||
@@ -14,10 +14,10 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
{
|
||||
public class RAInstallLogic
|
||||
public class InstallLogic : Widget
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public RAInstallLogic(Widget widget, Dictionary<string, string> installData, Action continueLoading)
|
||||
public InstallLogic(Widget widget, Dictionary<string, string> installData, Action continueLoading)
|
||||
{
|
||||
var panel = widget.Get("INSTALL_PANEL");
|
||||
var args = new WidgetArgs()
|
||||
@@ -30,6 +30,15 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
panel.Get<ButtonWidget>("DOWNLOAD_BUTTON").OnClick = () =>
|
||||
Ui.OpenWindow("INSTALL_DOWNLOAD_PANEL", args);
|
||||
|
||||
if (installData.ContainsKey("FilesToCopy") && !string.IsNullOrEmpty(installData["FilesToCopy"]) &&
|
||||
installData.ContainsKey("FilesToExtract") && !string.IsNullOrEmpty(installData["FilesToExtract"]))
|
||||
{
|
||||
args = new WidgetArgs(args)
|
||||
{
|
||||
{ "filesToCopy", installData["FilesToCopy"].Split(',') },
|
||||
{ "filesToExtract", installData["FilesToExtract"].Split(',') },
|
||||
};
|
||||
}
|
||||
panel.Get<ButtonWidget>("INSTALL_BUTTON").OnClick = () =>
|
||||
Ui.OpenWindow("INSTALL_FROMCD_PANEL", args);
|
||||
|
||||
Reference in New Issue
Block a user