From 8ef2f07d022ab932ff3e0753d1fede8aa5c0a8bb Mon Sep 17 00:00:00 2001 From: jupster Date: Tue, 26 Mar 2024 22:39:14 +1000 Subject: [PATCH 1/2] Reaction Forces DLC Support --- FASTER/App.config | 3 +++ FASTER/Models/ServerProfile.cs | 15 +++++++++++++++ FASTER/Models/SteamUpdaterModel.cs | 10 ++++++++++ FASTER/Properties/Settings.Designer.cs | 15 +++++++++++++++ FASTER/Properties/Settings.settings | 4 ++++ FASTER/ViewModel/ProfileViewModel.cs | 2 +- FASTER/ViewModel/SteamUpdaterViewModel.cs | 12 +++++++++++- FASTER/Views/Profile.xaml | 1 + FASTER/Views/Updater.xaml | 2 ++ 9 files changed, 62 insertions(+), 2 deletions(-) diff --git a/FASTER/App.config b/FASTER/App.config index 29997b90..2c4858ac 100644 --- a/FASTER/App.config +++ b/FASTER/App.config @@ -79,6 +79,9 @@ False + + False + \ No newline at end of file diff --git a/FASTER/Models/ServerProfile.cs b/FASTER/Models/ServerProfile.cs index 8e159588..fc3c2160 100644 --- a/FASTER/Models/ServerProfile.cs +++ b/FASTER/Models/ServerProfile.cs @@ -60,6 +60,7 @@ public class ServerProfile : INotifyPropertyChanged private bool _cslaDlcChecked; private bool _wsDlcChecked; private bool _speDlcChecked; + private bool _rfDlcChecked; private bool _enableHT = true; private bool _enableRanking; @@ -202,6 +203,16 @@ public bool SPEDLCChecked } } + public bool RFDLCChecked + { + get => _rfDlcChecked; + set + { + _rfDlcChecked = value; + RaisePropertyChanged(nameof(RFDLCChecked)); + } + } + public bool EnableHyperThreading { get => _enableHT; @@ -483,6 +494,10 @@ public string GetDlcAndPlayerMods(string playerMods) { _ = mods.Append("spe;"); } + if (RFDLCChecked) + { + _ = mods.Append("rf;"); + } if (!string.IsNullOrWhiteSpace(playerMods)) { _ = mods.Append($"{playerMods};"); diff --git a/FASTER/Models/SteamUpdaterModel.cs b/FASTER/Models/SteamUpdaterModel.cs index a74dcfc8..f6fdffc1 100644 --- a/FASTER/Models/SteamUpdaterModel.cs +++ b/FASTER/Models/SteamUpdaterModel.cs @@ -161,6 +161,16 @@ public bool UsingSPEDlc } } + public bool UsingRFDlc + { + get => Settings.Default.usingRFDlc; + set + { + Settings.Default.usingRFDlc = value; + Settings.Default.Save(); + RaisePropertyChanged(nameof(UsingRFDlc)); + } + } public string ApiKey { diff --git a/FASTER/Properties/Settings.Designer.cs b/FASTER/Properties/Settings.Designer.cs index 3992e86f..3e738553 100644 --- a/FASTER/Properties/Settings.Designer.cs +++ b/FASTER/Properties/Settings.Designer.cs @@ -367,5 +367,20 @@ public bool usingSPEDlc this["usingSPEDlc"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public bool usingRFDlc + { + get + { + return ((bool)(this["usingRFDlc"])); + } + set + { + this["usingRFDlc"] = value; + } + } } } diff --git a/FASTER/Properties/Settings.settings b/FASTER/Properties/Settings.settings index 51f83505..70869eeb 100644 --- a/FASTER/Properties/Settings.settings +++ b/FASTER/Properties/Settings.settings @@ -88,5 +88,9 @@ False + + + False + \ No newline at end of file diff --git a/FASTER/ViewModel/ProfileViewModel.cs b/FASTER/ViewModel/ProfileViewModel.cs index f10aaffe..10c9e41b 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", "spe.bikey" }; + var ignoredKeys = new[] {"a3.bikey", "a3c.bikey", "gm.bikey", "ws.bikey", "csla.bikey", "vn.bikey", "spe.bikey", "rf.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 5cec5844..2e4e0dcc 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 " : "")}{(Parameters.UsingSPEDlc ? "SPE " : "")}"}, + {"DLCs", $"{(Parameters.UsingGMDlc ? "GM " : "")}{(Parameters.UsingCSLADlc? "CSLA " : "")}{(Parameters.UsingPFDlc ? "SOG " : "")}{(Parameters.UsingWSDlc ? "WS " : "")}{(Parameters.UsingSPEDlc ? "SPE " : "")}{(Parameters.UsingRFDlc ? "RF " : "")}"}, {"Branch", $"{(Parameters.UsingPerfBinaries? "Profiling" : "Public")}"} }); @@ -160,6 +160,7 @@ public async Task UpdateClick() {233793, "Arma 3 Server Creator DLC - CSLA"}, {233794, "Arma 3 Server Creator DLC - SOGPF"}, {233795, "Arma 3 Server Creator DLC - WS"}, + {2647760, "Arma 3 Server Creator DLC - RF"}, }; //IReadOnlyList depotsList; @@ -252,6 +253,15 @@ public async Task UpdateClick() null)); } + if (Parameters.UsingRFDlc) + { + Parameters.Output += "\nChecking Arma 3 Server Creator DLC - RF..."; + depotsDownload.Add(( + depotsIDs.FirstOrDefault(d => d.Value == "Arma 3 Server Creator DLC - RF").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 ab8ad549..7c591ffc 100644 --- a/FASTER/Views/Profile.xaml +++ b/FASTER/Views/Profile.xaml @@ -99,6 +99,7 @@ + diff --git a/FASTER/Views/Updater.xaml b/FASTER/Views/Updater.xaml index 2c108ca8..6ae2b073 100644 --- a/FASTER/Views/Updater.xaml +++ b/FASTER/Views/Updater.xaml @@ -118,6 +118,8 @@ Margin="10,3" HorizontalAlignment="Left" /> +