summaryrefslogtreecommitdiff
path: root/StardewModdingAPI/Inheritance/SGame.cs
diff options
context:
space:
mode:
Diffstat (limited to 'StardewModdingAPI/Inheritance/SGame.cs')
-rw-r--r--StardewModdingAPI/Inheritance/SGame.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/StardewModdingAPI/Inheritance/SGame.cs b/StardewModdingAPI/Inheritance/SGame.cs
index 21fbea70..83f8e335 100644
--- a/StardewModdingAPI/Inheritance/SGame.cs
+++ b/StardewModdingAPI/Inheritance/SGame.cs
@@ -44,6 +44,8 @@ namespace StardewModdingAPI.Inheritance
}
public int PreviousGameLocations { get; private set; }
+ public int PreviousLocationObjects { get; private set; }
+
public GameLocation PreviousGameLocation { get; private set; }
public IClickableMenu PreviousActiveMenu { get; private set; }
@@ -261,6 +263,12 @@ namespace StardewModdingAPI.Inheritance
PreviousFarmer = player;
}
+ if(currentLocation != null && PreviousLocationObjects != currentLocation.objects.GetHash())
+ {
+ Events.InvokeOnNewLocationObject(currentLocation.objects);
+ PreviousLocationObjects = currentLocation.objects.GetHash();
+ }
+
if (timeOfDay != PreviousTimeOfDay)
{
Events.InvokeTimeOfDayChanged(PreviousTimeOfDay, timeOfDay);