summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Events/Location.cs
diff options
context:
space:
mode:
authorCarl <slxxls92@gmail.com>2016-05-30 01:33:37 +0100
committerCarl <slxxls92@gmail.com>2016-05-30 01:33:37 +0100
commitfa666f803398e29a7ffec0707cd6a1ec3571d3e9 (patch)
tree71099c94fa92196cfb6cdb42a56379e6fdaa4364 /src/StardewModdingAPI/Events/Location.cs
parent4edee54da20e7655ae24cf1ac2abded5ec1ba2c5 (diff)
parent1212222e9f59a68a9f167d20bbddd8a4e1a3cf81 (diff)
downloadSMAPI-fa666f803398e29a7ffec0707cd6a1ec3571d3e9.tar.gz
SMAPI-fa666f803398e29a7ffec0707cd6a1ec3571d3e9.tar.bz2
SMAPI-fa666f803398e29a7ffec0707cd6a1ec3571d3e9.zip
Merge pull request #118 from Gormogon/master
Some Semi-Big Changes
Diffstat (limited to 'src/StardewModdingAPI/Events/Location.cs')
-rw-r--r--src/StardewModdingAPI/Events/Location.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/Events/Location.cs b/src/StardewModdingAPI/Events/Location.cs
new file mode 100644
index 00000000..f951ab95
--- /dev/null
+++ b/src/StardewModdingAPI/Events/Location.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using Microsoft.Xna.Framework;
+using StardewValley;
+using Object = StardewValley.Object;
+
+namespace StardewModdingAPI.Events
+{
+ public static class LocationEvents
+ {
+ public static event EventHandler<EventArgsGameLocationsChanged> LocationsChanged = delegate { };
+ public static event EventHandler<EventArgsLocationObjectsChanged> LocationObjectsChanged = delegate { };
+ public static event EventHandler<EventArgsCurrentLocationChanged> CurrentLocationChanged = delegate { };
+
+ internal static void InvokeLocationsChanged(List<GameLocation> newLocations)
+ {
+ LocationsChanged.Invoke(null, new EventArgsGameLocationsChanged(newLocations));
+ }
+
+ internal static void InvokeCurrentLocationChanged(GameLocation priorLocation, GameLocation newLocation)
+ {
+ CurrentLocationChanged.Invoke(null, new EventArgsCurrentLocationChanged(priorLocation, newLocation));
+ }
+
+ internal static void InvokeOnNewLocationObject(SerializableDictionary<Vector2, Object> newObjects)
+ {
+ LocationObjectsChanged.Invoke(null, new EventArgsLocationObjectsChanged(newObjects));
+ }
+ }
+} \ No newline at end of file