diff options
author | ClxS <slxxls92@gmail.com> | 2016-03-03 20:36:53 +0000 |
---|---|---|
committer | ClxS <slxxls92@gmail.com> | 2016-03-03 20:36:53 +0000 |
commit | d741f46aab9b08f6a46d79291c59a2185b157780 (patch) | |
tree | bc7fb8571e30d72d2d60869069a7bb1b368be7d8 /StardewModdingAPI/Inheritance | |
parent | 9a1b910ea32f518b605c88315f192afc6fc40f28 (diff) | |
download | SMAPI-d741f46aab9b08f6a46d79291c59a2185b157780.tar.gz SMAPI-d741f46aab9b08f6a46d79291c59a2185b157780.tar.bz2 SMAPI-d741f46aab9b08f6a46d79291c59a2185b157780.zip |
Added event for when item is placed on ground
Diffstat (limited to 'StardewModdingAPI/Inheritance')
-rw-r--r-- | StardewModdingAPI/Inheritance/SGame.cs | 8 |
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); |