From fce4129392c317674b497d3bf90e6549f005afe9 Mon Sep 17 00:00:00 2001 From: Brett Taylor Date: Sat, 26 Jan 2019 15:24:01 +0000 Subject: [PATCH] DontTrackList now respects items as well as objects. --- ResourceMonitor/Components/ResourceMonitorLogic.cs | 5 +++++ ResourceMonitor/EntryPoint.cs | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ResourceMonitor/Components/ResourceMonitorLogic.cs b/ResourceMonitor/Components/ResourceMonitorLogic.cs index 8e50c9a..63badad 100644 --- a/ResourceMonitor/Components/ResourceMonitorLogic.cs +++ b/ResourceMonitor/Components/ResourceMonitorLogic.cs @@ -165,6 +165,11 @@ private void AddItemsToTracker(StorageContainer sc, TechType item, int amountToA { if (IsBeingDeleted == true) return; + if (DONT_TRACK_GAMEOBJECTS.Contains(item.AsString().ToLower())) + { + return; + } + if (TrackedResources.ContainsKey(item)) { TrackedResources[item].Amount = TrackedResources[item].Amount + amountToAdd; diff --git a/ResourceMonitor/EntryPoint.cs b/ResourceMonitor/EntryPoint.cs index b13aafe..8978a0b 100644 --- a/ResourceMonitor/EntryPoint.cs +++ b/ResourceMonitor/EntryPoint.cs @@ -52,10 +52,11 @@ private static void LoadDontTrackList() { if (string.IsNullOrEmpty(line) == false) { - Components.ResourceMonitorLogic.DONT_TRACK_GAMEOBJECTS.Add(line); + Components.ResourceMonitorLogic.DONT_TRACK_GAMEOBJECTS.Add(line.ToLower()); } } } + Components.ResourceMonitorLogic.DONT_TRACK_GAMEOBJECTS.Sort(); } else {