refactors and string clarifications
This commit is contained in:
parent
82d2e7758f
commit
c3e6ccb33b
3 changed files with 6 additions and 4 deletions
|
@ -867,8 +867,8 @@ internal partial class SelectForm : CustomForm
|
|||
_ = blockedDirectoryExceptions.Append(helpButtonListPrefix + name);
|
||||
using DialogForm form = new(this);
|
||||
_ = form.Show(SystemIcons.Information,
|
||||
"Blocks the program from caching and displaying games protected by DLL checks," +
|
||||
"\nanti-cheats, or that are confirmed not to be working with SmokeAPI or ScreamAPI." +
|
||||
"Blocks the program from caching and displaying games protected by anti-cheats." +
|
||||
"\nYou disable this option and install DLC unlockers to protected games at your own risk!" +
|
||||
"\n\nBlocked games: " + (string.IsNullOrWhiteSpace(blockedGames.ToString()) ? "(none)" : blockedGames) +
|
||||
"\n\nBlocked game sub-directories: " + (string.IsNullOrWhiteSpace(blockedDirectories.ToString()) ? "(none)" : blockedDirectories) +
|
||||
"\n\nBlocked game sub-directory exceptions: " + (string.IsNullOrWhiteSpace(blockedDirectoryExceptions.ToString()) ? "(none)" : blockedDirectoryExceptions),
|
||||
|
|
|
@ -27,8 +27,8 @@ internal static class Program
|
|||
internal static readonly string CurrentProcessFilePath = CurrentProcess.MainModule.FileName;
|
||||
|
||||
internal static bool BlockProtectedGames = true;
|
||||
internal static readonly string[] ProtectedGames = { "PAYDAY 2", "Call to Arms" }; // non-functioning DLC unlockers or DLL detections
|
||||
internal static readonly string[] ProtectedGameDirectories = { @"\EasyAntiCheat", @"\BattlEye" }; // DLL detections
|
||||
internal static readonly string[] ProtectedGames = { "PAYDAY 2" };
|
||||
internal static readonly string[] ProtectedGameDirectories = { @"\EasyAntiCheat", @"\BattlEye" };
|
||||
internal static readonly string[] ProtectedGameDirectoryExceptions = Array.Empty<string>();
|
||||
|
||||
internal static bool IsGameBlocked(string name, string directory = null)
|
||||
|
|
|
@ -231,6 +231,7 @@ internal static class SteamCMD
|
|||
#pragma warning restore IDE0150 // Prefer 'null' check over type check
|
||||
VToken extended = appInfo.Value.GetChild("extended");
|
||||
if (extended is not null)
|
||||
#pragma warning disable IDE0220 // Add explicit cast
|
||||
foreach (VProperty property in extended.Where(p => p is VProperty && (p as VProperty).Key == "listofdlc"))
|
||||
foreach (string id in property.Value.ToString().Split(","))
|
||||
if (int.TryParse(id, out int appId) && !dlcIds.Contains("" + appId))
|
||||
|
@ -240,6 +241,7 @@ internal static class SteamCMD
|
|||
foreach (VProperty property in depots.Where(p => p is VProperty && int.TryParse((p as VProperty).Key, out int _)))
|
||||
if (int.TryParse(property.Value.GetChild("dlcappid")?.ToString(), out int appId) && !dlcIds.Contains("" + appId))
|
||||
dlcIds.Add("" + appId);
|
||||
#pragma warning restore IDE0220 // Add explicit cast
|
||||
return dlcIds;
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue