Skip to content

Commit

Permalink
DontTrackList now respects items as well as objects.
Browse files Browse the repository at this point in the history
  • Loading branch information
brett-taylor committed Jan 26, 2019
1 parent 06109d6 commit fce4129
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ResourceMonitor/Components/ResourceMonitorLogic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion ResourceMonitor/EntryPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit fce4129

Please sign in to comment.