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)); } } }