From 6e2f80018bc66011a18f41cae8adb5d2304baf03 Mon Sep 17 00:00:00 2001 From: MiszczuZPolski <71414303+MiszczuZPolski@users.noreply.github.com> Date: Tue, 25 Jul 2023 19:38:53 +0200 Subject: [PATCH 1/3] spe support --- FASTER/App.config | 3 +++ FASTER/Models/ServerProfile.cs | 15 +++++++++++++++ FASTER/Models/SteamUpdaterModel.cs | 11 +++++++++++ FASTER/Properties/Settings.Designer.cs | 15 +++++++++++++++ FASTER/Properties/Settings.settings | 2 ++ FASTER/ViewModel/ProfileViewModel.cs | 2 +- FASTER/ViewModel/SteamUpdaterViewModel.cs | 13 +++++++++++-- FASTER/Views/Profile.xaml | 1 + FASTER/Views/Updater.xaml | 2 ++ 9 files changed, 61 insertions(+), 3 deletions(-) diff --git a/FASTER/App.config b/FASTER/App.config index 7a49ad2c..29997b90 100644 --- a/FASTER/App.config +++ b/FASTER/App.config @@ -76,6 +76,9 @@ False + + False + \ No newline at end of file diff --git a/FASTER/Models/ServerProfile.cs b/FASTER/Models/ServerProfile.cs index 44c5e7d4..8e159588 100644 --- a/FASTER/Models/ServerProfile.cs +++ b/FASTER/Models/ServerProfile.cs @@ -59,6 +59,7 @@ public class ServerProfile : INotifyPropertyChanged private bool _pfDlcChecked; private bool _cslaDlcChecked; private bool _wsDlcChecked; + private bool _speDlcChecked; private bool _enableHT = true; private bool _enableRanking; @@ -191,6 +192,16 @@ public bool WSDLCChecked } } + public bool SPEDLCChecked + { + get => _speDlcChecked; + set + { + _speDlcChecked = value; + RaisePropertyChanged(nameof(SPEDLCChecked)); + } + } + public bool EnableHyperThreading { get => _enableHT; @@ -468,6 +479,10 @@ public string GetDlcAndPlayerMods(string playerMods) { _ = mods.Append("ws;"); } + if (SPEDLCChecked) + { + _ = mods.Append("spe;"); + } if (!string.IsNullOrWhiteSpace(playerMods)) { _ = mods.Append($"{playerMods};"); diff --git a/FASTER/Models/SteamUpdaterModel.cs b/FASTER/Models/SteamUpdaterModel.cs index 2efcd869..a74dcfc8 100644 --- a/FASTER/Models/SteamUpdaterModel.cs +++ b/FASTER/Models/SteamUpdaterModel.cs @@ -150,6 +150,17 @@ public bool UsingWSDlc } } + public bool UsingSPEDlc + { + get => Settings.Default.usingSPEDlc; + set + { + Settings.Default.usingSPEDlc = value; + Settings.Default.Save(); + RaisePropertyChanged(nameof(UsingSPEDlc)); + } + } + public string ApiKey { diff --git a/FASTER/Properties/Settings.Designer.cs b/FASTER/Properties/Settings.Designer.cs index 09f80509..3992e86f 100644 --- a/FASTER/Properties/Settings.Designer.cs +++ b/FASTER/Properties/Settings.Designer.cs @@ -352,5 +352,20 @@ public bool usingWSDlc { this["usingWSDlc"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public bool usingSPEDlc + { + get + { + return ((bool)(this["usingSPEDlc"])); + } + set + { + this["usingSPEDlc"] = value; + } + } } } diff --git a/FASTER/Properties/Settings.settings b/FASTER/Properties/Settings.settings index 380c6b03..51f83505 100644 --- a/FASTER/Properties/Settings.settings +++ b/FASTER/Properties/Settings.settings @@ -86,5 +86,7 @@ False + + False \ No newline at end of file diff --git a/FASTER/ViewModel/ProfileViewModel.cs b/FASTER/ViewModel/ProfileViewModel.cs index ebd80b59..f10aaffe 100644 --- a/FASTER/ViewModel/ProfileViewModel.cs +++ b/FASTER/ViewModel/ProfileViewModel.cs @@ -387,7 +387,7 @@ internal async Task CopyModKeys() internal async Task ClearModKeys() { - var ignoredKeys = new[] {"a3.bikey", "a3c.bikey", "gm.bikey", "ws.bikey", "csla.bikey", "vn.bikey" }; + var ignoredKeys = new[] {"a3.bikey", "a3c.bikey", "gm.bikey", "ws.bikey", "csla.bikey", "vn.bikey", "spe.bikey" }; if (Directory.Exists(Path.Combine(Profile.ArmaPath, "keys"))) { foreach (var keyFile in Directory.GetFiles(Path.Combine(Profile.ArmaPath, "keys"))) diff --git a/FASTER/ViewModel/SteamUpdaterViewModel.cs b/FASTER/ViewModel/SteamUpdaterViewModel.cs index 1b0e8a76..d54155f8 100644 --- a/FASTER/ViewModel/SteamUpdaterViewModel.cs +++ b/FASTER/ViewModel/SteamUpdaterViewModel.cs @@ -138,7 +138,7 @@ public async Task UpdateClick() Analytics.TrackEvent("Updater - Clicked Update", new Dictionary { {"Name", Properties.Settings.Default.steamUserName}, - {"DLCs", $"{(Parameters.UsingGMDlc ? "GM " : "")}{(Parameters.UsingCSLADlc? "CSLA " : "")}{(Parameters.UsingPFDlc ? "SOG " : "")}{(Parameters.UsingWSDlc ? "WS " : "")}"}, + {"DLCs", $"{(Parameters.UsingGMDlc ? "GM " : "")}{(Parameters.UsingCSLADlc? "CSLA " : "")}{(Parameters.UsingPFDlc ? "SOG " : "")}{(Parameters.UsingWSDlc ? "WS " : "")}{(Parameters.UsingSPEDlc ? "SPE " : "")}"}, {"Branch", $"{(Parameters.UsingPerfBinaries? "Profiling" : "Public")}"} }); @@ -155,7 +155,7 @@ public async Task UpdateClick() {233784, "Arma 3 Server Profiling - WINDOWS Depot"}, {233785, "Arma 3 Server - Profiler - LINUX Depot"}, {233787, "Arma 3 Server Creator DLC - GM"}, - {233788, "Arma 3 Server Prague Project 2"}, + {233788, "Arma 3 Server Creator DLC - SPE"}, {233789, "Arma 3 Server Creator DLC - CSLA"}, {233790, "Arma 3 Server Creator DLC - SOGPF"}, {233791, "Arma 3 Server Creator DLC - WS"}, @@ -237,6 +237,15 @@ public async Task UpdateClick() null)); } + if (Parameters.UsingSPEDlc) + { + Parameters.Output += "\nChecking Arma 3 Server Creator DLC - SPE..."; + depotsDownload.Add(( + depotsIDs.FirstOrDefault(d => d.Value == "Arma 3 Server Creator DLC - SPE").Key, + "creatordlc", + null)); + } + await RunServerUpdater(Parameters.InstallDirectory, appId, depotsDownload); Parameters.Output += "\n\nAll Done ! "; diff --git a/FASTER/Views/Profile.xaml b/FASTER/Views/Profile.xaml index a69dff57..ab8ad549 100644 --- a/FASTER/Views/Profile.xaml +++ b/FASTER/Views/Profile.xaml @@ -98,6 +98,7 @@ + diff --git a/FASTER/Views/Updater.xaml b/FASTER/Views/Updater.xaml index f6840694..2c108ca8 100644 --- a/FASTER/Views/Updater.xaml +++ b/FASTER/Views/Updater.xaml @@ -116,6 +116,8 @@ HorizontalAlignment="Left" /> +