summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/SMAPI/Framework/Utilities/TickCacheDictionary.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/SMAPI/Framework/Utilities/TickCacheDictionary.cs b/src/SMAPI/Framework/Utilities/TickCacheDictionary.cs
index 1613a480..5921e089 100644
--- a/src/SMAPI/Framework/Utilities/TickCacheDictionary.cs
+++ b/src/SMAPI/Framework/Utilities/TickCacheDictionary.cs
@@ -13,7 +13,7 @@ namespace StardewModdingAPI.Framework.Utilities
** Fields
*********/
/// <summary>The last game tick for which data was cached.</summary>
- private int LastGameTick = -1;
+ private uint? LastGameTick;
/// <summary>The underlying cached data.</summary>
private readonly Dictionary<TKey, TValue> Cache = new();
@@ -28,10 +28,10 @@ namespace StardewModdingAPI.Framework.Utilities
public TValue GetOrSet(TKey cacheKey, Func<TValue> get)
{
// clear cache on new tick
- if (Game1.ticks != this.LastGameTick)
+ if (SCore.TicksElapsed != this.LastGameTick)
{
this.Cache.Clear();
- this.LastGameTick = Game1.ticks;
+ this.LastGameTick = SCore.TicksElapsed;
}
// fetch value