From 27dece2cf445147c5e2848f9ec26f38a101f50fc Mon Sep 17 00:00:00 2001 From: Gormogon Date: Sun, 29 May 2016 18:23:01 -0400 Subject: Attempt to migrate to new directory structure. --- src/StardewModdingAPI/Events/Location.cs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/StardewModdingAPI/Events/Location.cs (limited to 'src/StardewModdingAPI/Events/Location.cs') 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 LocationsChanged = delegate { }; + public static event EventHandler LocationObjectsChanged = delegate { }; + public static event EventHandler CurrentLocationChanged = delegate { }; + + internal static void InvokeLocationsChanged(List 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 newObjects) + { + LocationObjectsChanged.Invoke(null, new EventArgsLocationObjectsChanged(newObjects)); + } + } +} \ No newline at end of file -- cgit