From 929dccb75a1405737975d76648e015a3e7c00177 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 7 Oct 2017 23:07:10 -0400 Subject: reorganise repo structure --- src/StardewModdingAPI/Events/LocationEvents.cs | 54 -------------------------- 1 file changed, 54 deletions(-) delete mode 100644 src/StardewModdingAPI/Events/LocationEvents.cs (limited to 'src/StardewModdingAPI/Events/LocationEvents.cs') diff --git a/src/StardewModdingAPI/Events/LocationEvents.cs b/src/StardewModdingAPI/Events/LocationEvents.cs deleted file mode 100644 index b834bc1c..00000000 --- a/src/StardewModdingAPI/Events/LocationEvents.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.Collections.Generic; -using Microsoft.Xna.Framework; -using StardewModdingAPI.Framework; -using StardewValley; -using Object = StardewValley.Object; - -namespace StardewModdingAPI.Events -{ - /// Events raised when the player transitions between game locations, a location is added or removed, or the objects in the current location change. - public static class LocationEvents - { - /********* - ** Events - *********/ - /// Raised after the player warps to a new location. - public static event EventHandler CurrentLocationChanged; - - /// Raised after a game location is added or removed. - public static event EventHandler LocationsChanged; - - /// Raised after the list of objects in the current location changes (e.g. an object is added or removed). - public static event EventHandler LocationObjectsChanged; - - - /********* - ** Internal methods - *********/ - /// Raise a event. - /// Encapsulates monitoring and logging. - /// The player's previous location. - /// The player's current location. - internal static void InvokeCurrentLocationChanged(IMonitor monitor, GameLocation priorLocation, GameLocation newLocation) - { - monitor.SafelyRaiseGenericEvent($"{nameof(LocationEvents)}.{nameof(LocationEvents.CurrentLocationChanged)}", LocationEvents.CurrentLocationChanged?.GetInvocationList(), null, new EventArgsCurrentLocationChanged(priorLocation, newLocation)); - } - - /// Raise a event. - /// Encapsulates monitoring and logging. - /// The current list of game locations. - internal static void InvokeLocationsChanged(IMonitor monitor, List newLocations) - { - monitor.SafelyRaiseGenericEvent($"{nameof(LocationEvents)}.{nameof(LocationEvents.LocationsChanged)}", LocationEvents.LocationsChanged?.GetInvocationList(), null, new EventArgsGameLocationsChanged(newLocations)); - } - - /// Raise a event. - /// Encapsulates monitoring and logging. - /// The current list of objects in the current location. - internal static void InvokeOnNewLocationObject(IMonitor monitor, SerializableDictionary newObjects) - { - monitor.SafelyRaiseGenericEvent($"{nameof(LocationEvents)}.{nameof(LocationEvents.LocationObjectsChanged)}", LocationEvents.LocationObjectsChanged?.GetInvocationList(), null, new EventArgsLocationObjectsChanged(newObjects)); - } - } -} -- cgit