Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion FASTER/FASTER.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>FASTERKey.snk</AssemblyOriginatorKeyFile>
<Authors>Keelah Fox, Jupster, Canno.n</Authors>
<Version>1.9.8.1</Version>
<Version>1.9.8.102</Version>
<Company>FoxliCorp.</Company>
<Description>Fox's Arma Server Tool Extended Rewrite</Description>
<Copyright>Copyright © 2019</Copyright>
Expand Down
23 changes: 21 additions & 2 deletions FASTER/Models/ServerCfg.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
using System;
using System.Text.RegularExpressions;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Linq;


namespace FASTER.Models
{
static class ServerCfgArrays
Expand Down Expand Up @@ -892,6 +894,20 @@
RaisePropertyChanged(nameof(MissionContentOverride));
}

// Profiles saved before the AdvancedOptions fix store server.cfg text with
// ignoreMissionLoadErrors after the class's closing "};". Regenerate only those.
private static readonly Regex LegacyIgnoreMissionLoadErrors =
new(@"\}\s*;\s*ignoreMissionLoadErrors", RegexOptions.Compiled);

public bool MigrateLegacyLayout()
{
if (string.IsNullOrEmpty(serverCfgContent) || !LegacyIgnoreMissionLoadErrors.IsMatch(serverCfgContent))
return false;

ServerCfgContent = ProcessFile();
return true;
}

public string ProcessFile()
{
if (!missionSelectorChecked)
Expand Down Expand Up @@ -961,8 +977,11 @@
+ $"timeStampFormat = \"{timeStampFormat}\";\t\t// Set the timestamp format used on each report line in server-side RPT file. Possible values are \"none\" (default),\"short\",\"full\".\r\n"
+ $"BattlEye = {battlEye};\t\t\t\t// Server to use BattlEye system\r\n"
+ $"queueSizeLogG = {queueSizeLogG};\t\t\t// If a specific players message queue is larger than 1MB and #monitor is running, dump his messages to a logfile for analysis \r\n"
+ $"class AdvancedOptions\r\n{{\r\n\tLogObjectNotFound = {logObjectNotFound};\t\t// When false to skip logging 'Server: Object not found messages'.\r\n\tSkipDescriptionParsing = {skipDescriptionParsing};\t\t// When true to skip parsing of description.ext/mission.sqm. Will show pbo filename instead of configured missionName. OverviewText and such won't work, but loading the mission list is a lot faster when there are many missions.\r\n}};\r\n"
+ $"ignoreMissionLoadErrors = {ignoreMissionLoadErrors};\t\t// When set to true, the mission will load no matter the amount of loading errors. If set to false, the server will abort mission's loading and return to mission selection.\r\n"
+ $"class AdvancedOptions\r\n{{\r\n"
+ $"\tLogObjectNotFound = {logObjectNotFound};\t\t// When false to skip logging 'Server: Object not found messages'.\r\n"
+ $"\tSkipDescriptionParsing = {skipDescriptionParsing};\t\t// When true to skip parsing of description.ext/mission.sqm. Will show pbo filename instead of configured missionName. OverviewText and such won't work, but loading the mission list is a lot faster when there are many missions.\r\n"
+ $"\tignoreMissionLoadErrors = {ignoreMissionLoadErrors};\t\t// When set to true, the mission will load no matter the amount of loading errors. If set to false, the server will abort mission's loading and return to mission selection.\r\n"
+ "};\r\n"
+ $"forcedDifficulty = \"{forcedDifficulty}\";\t\t\t// Forced difficulty (Recruit, Regular, Veteran, Custom)\r\n"
+ "\r\n"
+ "// TIMEOUTS\r\n"
Expand Down Expand Up @@ -1054,7 +1073,7 @@
}
}

public event PropertyChangedEventHandler PropertyChanged;

Check warning on line 1076 in FASTER/Models/ServerCfg.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in type of 'event PropertyChangedEventHandler ProfileMission.PropertyChanged' doesn't match implicitly implemented member 'event PropertyChangedEventHandler? INotifyPropertyChanged.PropertyChanged'.

Check warning on line 1076 in FASTER/Models/ServerCfg.cs

View workflow job for this annotation

GitHub Actions / Analyze with CodeQL (csharp)

Nullability of reference types in type of 'event PropertyChangedEventHandler ProfileMission.PropertyChanged' doesn't match implicitly implemented member 'event PropertyChangedEventHandler? INotifyPropertyChanged.PropertyChanged'.

private void RaisePropertyChanged(string property)
{
Expand Down
2 changes: 2 additions & 0 deletions FASTER/ViewModel/ProfileViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,8 @@ internal async Task ClearModKeys()

public void LoadData()
{
Profile.ServerCfg.MigrateLegacyLayout();

var modlist = new List<ProfileMod>();
foreach(var mod in Properties.Settings.Default.armaMods.ArmaMods)
{
Expand Down
2 changes: 1 addition & 1 deletion FASTERTests/FASTERTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.11.0" />
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.421302">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion FASTER_Version.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.9.8.1</version>
<version>1.9.8.102</version>
<url>https://github.com/Foxlider/FASTER/releases/latest/download/Release_x64.zip</url>
<changelog>https://github.com/Foxlider/FASTER/releases</changelog>
<mandatory>true</mandatory>
Expand Down
Loading