diff options
author | ClxS <slxxls92@gmail.com> | 2016-03-03 20:42:53 +0000 |
---|---|---|
committer | ClxS <slxxls92@gmail.com> | 2016-03-03 20:42:53 +0000 |
commit | c488d35b941fd3f1a320153b143e39e45f0260c2 (patch) | |
tree | 2f6694a7d00393fb06fff1493dc83a11c6837fd1 /StardewModdingAPI/Inheritance/SGame.cs | |
parent | 7adcb3930f6a5338d13900b6cd1e006c929df71e (diff) | |
parent | d741f46aab9b08f6a46d79291c59a2185b157780 (diff) | |
download | SMAPI-c488d35b941fd3f1a320153b143e39e45f0260c2.tar.gz SMAPI-c488d35b941fd3f1a320153b143e39e45f0260c2.tar.bz2 SMAPI-c488d35b941fd3f1a320153b143e39e45f0260c2.zip |
Merged Feature_AdditionalEventHandlers
Diffstat (limited to 'StardewModdingAPI/Inheritance/SGame.cs')
-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); |