From d741f46aab9b08f6a46d79291c59a2185b157780 Mon Sep 17 00:00:00 2001 From: ClxS Date: Thu, 3 Mar 2016 20:36:53 +0000 Subject: Added event for when item is placed on ground --- StardewModdingAPI/Inheritance/SGame.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'StardewModdingAPI/Inheritance/SGame.cs') 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); -- cgit