summaryrefslogtreecommitdiff
path: root/StardewModdingAPI/Inheritance/SGame.cs
diff options
context:
space:
mode:
authorZoryn <Zoryn4163@users.noreply.github.com>2016-03-03 16:40:53 -0500
committerZoryn <Zoryn4163@users.noreply.github.com>2016-03-03 16:40:53 -0500
commit7fa375ea66b0d81ba9ef36a2e211135d9db702c0 (patch)
treebc7fb8571e30d72d2d60869069a7bb1b368be7d8 /StardewModdingAPI/Inheritance/SGame.cs
parent9a1b910ea32f518b605c88315f192afc6fc40f28 (diff)
parentd741f46aab9b08f6a46d79291c59a2185b157780 (diff)
downloadSMAPI-7fa375ea66b0d81ba9ef36a2e211135d9db702c0.tar.gz
SMAPI-7fa375ea66b0d81ba9ef36a2e211135d9db702c0.tar.bz2
SMAPI-7fa375ea66b0d81ba9ef36a2e211135d9db702c0.zip
Merge pull request #18 from ClxS/Feature_AdditionalEventListeners
Added event for when item is placed on ground
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);