From 0b07e8b8f6574db672356ca0c7250ad3ed330481 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Mon, 27 Mar 2023 20:00:30 +0200 Subject: [PATCH] Code cleanup --- Pal.Client/Configuration/ConfigurationData.cs | 2 +- Pal.Client/Configuration/Legacy/JsonFloorState.cs | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Pal.Client/Configuration/ConfigurationData.cs b/Pal.Client/Configuration/ConfigurationData.cs index 6696d07..929ce43 100644 --- a/Pal.Client/Configuration/ConfigurationData.cs +++ b/Pal.Client/Configuration/ConfigurationData.cs @@ -15,7 +15,7 @@ namespace Pal.Client.Configuration public const string ConfigFileName = "palace-pal.config.json"; - private static bool? _supportsDpapi = null; + private static bool? _supportsDpapi; public static bool SupportsDpapi { get diff --git a/Pal.Client/Configuration/Legacy/JsonFloorState.cs b/Pal.Client/Configuration/Legacy/JsonFloorState.cs index df59d93..90d8d7d 100644 --- a/Pal.Client/Configuration/Legacy/JsonFloorState.cs +++ b/Pal.Client/Configuration/Legacy/JsonFloorState.cs @@ -20,9 +20,6 @@ namespace Pal.Client.Configuration.Legacy private static string _pluginConfigDirectory = null!; - // might not be true, but this is 'less strict filtering' for migrations - private static readonly EMode _mode = EMode.Online; - internal static void SetContextProperties(string pluginConfigDirectory) { _pluginConfigDirectory = pluginConfigDirectory; @@ -38,12 +35,7 @@ namespace Pal.Client.Configuration.Legacy private void ApplyFilters() { - if (_mode == EMode.Offline) - Markers = new ConcurrentBag(Markers.Where(x => x.Seen || (x.WasImported && x.Imports.Count > 0))); - else - // ensure old import markers are removed if they are no longer part of a "current" import - // this MAY remove markers the server sent you (and that you haven't seen), but this should be fixed the next time you enter the zone - Markers = new ConcurrentBag(Markers.Where(x => x.Seen || !x.WasImported || x.Imports.Count > 0)); + Markers = new ConcurrentBag(Markers.Where(x => x.Seen || !x.WasImported || x.Imports.Count > 0)); } public static JsonFloorState? Load(ushort territoryType)