Skip to content

Commit

Permalink
Merge pull request #174 from Foxlider/hotfix/RF
Browse files Browse the repository at this point in the history
Hotfix for RF Support
  • Loading branch information
jupster authored Mar 27, 2024
2 parents 8523c1b + fd42c97 commit d950840
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 2 deletions.
3 changes: 3 additions & 0 deletions FASTER/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@
<setting name="usingSPEDlc" serializeAs="String">
<value>False</value>
</setting>
<setting name="usingRFDlc" serializeAs="String">
<value>False</value>
</setting>
</FASTER.Properties.Settings>
</userSettings>
</configuration>
15 changes: 15 additions & 0 deletions FASTER/Models/ServerProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -202,6 +203,16 @@ public bool SPEDLCChecked
}
}

public bool RFDLCChecked
{
get => _rfDlcChecked;
set
{
_rfDlcChecked = value;
RaisePropertyChanged(nameof(RFDLCChecked));
}
}

public bool EnableHyperThreading
{
get => _enableHT;
Expand Down Expand Up @@ -483,6 +494,10 @@ public string GetDlcAndPlayerMods(string playerMods)
{
_ = mods.Append("spe;");
}
if (RFDLCChecked)
{
_ = mods.Append("rf;");
}
if (!string.IsNullOrWhiteSpace(playerMods))
{
_ = mods.Append($"{playerMods};");
Expand Down
10 changes: 10 additions & 0 deletions FASTER/Models/SteamUpdaterModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
15 changes: 15 additions & 0 deletions FASTER/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions FASTER/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,9 @@
</Setting>
<Setting Name="usingSPEDlc" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="usingRFDlc" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>
2 changes: 1 addition & 1 deletion FASTER/ViewModel/ProfileViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")))
Expand Down
12 changes: 11 additions & 1 deletion FASTER/ViewModel/SteamUpdaterViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public async Task UpdateClick()
Analytics.TrackEvent("Updater - Clicked Update", new Dictionary<string, string>
{
{"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")}"}
});

Expand All @@ -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"},
{233799, "Arma 3 Server Creator DLC - RF"},
};

//IReadOnlyList<Depot> depotsList;
Expand Down Expand Up @@ -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 ! ";
Expand Down
1 change: 1 addition & 0 deletions FASTER/Views/Profile.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
<CheckBox IsChecked="{Binding Profile.CSLADLCChecked}" Content="CSLA DLC" Margin="10,3" HorizontalAlignment="Left"/>
<CheckBox IsChecked="{Binding Profile.WSDLCChecked}" Content="Western Sahara DLC" Margin="10,3" HorizontalAlignment="Left"/>
<CheckBox IsChecked="{Binding Profile.SPEDLCChecked}" Content="Spearhead 1944 DLC" Margin="10,3" HorizontalAlignment="Left"/>
<CheckBox IsChecked="{Binding Profile.RFDLCChecked}" Content="Reaction Forces DLC" Margin="10,3" HorizontalAlignment="Left"/>
</StackPanel>
</Expander>
</Canvas>
Expand Down
2 changes: 2 additions & 0 deletions FASTER/Views/Updater.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@
Margin="10,3" HorizontalAlignment="Left" />
<CheckBox IsChecked="{Binding Parameters.UsingSPEDlc}" Content="Spearhead 1944 DLC"
Margin="10,3" HorizontalAlignment="Left"/>
<CheckBox IsChecked="{Binding Parameters.UsingRFDlc}" Content="Reaction Forces DLC"
Margin="10,3" HorizontalAlignment="Left"/>
</StackPanel>
<Button Style="{StaticResource MahApps.Styles.Button.MetroSquare.Accent}" BorderThickness="0" Grid.Row="4" Content="Update" Margin="10" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Click="Update_Click"/>
</Grid>
Expand Down

0 comments on commit d950840

Please sign in to comment.