summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Events/LocationEvents.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-10-07 23:07:10 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-10-07 23:07:10 -0400
commit929dccb75a1405737975d76648e015a3e7c00177 (patch)
tree659fe16509327e694555db363caf7f47f326443b /src/StardewModdingAPI/Events/LocationEvents.cs
parent926894f8f52c2a5cf104fcac2f7f34b637f7b531 (diff)
downloadSMAPI-929dccb75a1405737975d76648e015a3e7c00177.tar.gz
SMAPI-929dccb75a1405737975d76648e015a3e7c00177.tar.bz2
SMAPI-929dccb75a1405737975d76648e015a3e7c00177.zip
reorganise repo structure
Diffstat (limited to 'src/StardewModdingAPI/Events/LocationEvents.cs')
-rw-r--r--src/StardewModdingAPI/Events/LocationEvents.cs54
1 files changed, 0 insertions, 54 deletions
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
-{
- /// <summary>Events raised when the player transitions between game locations, a location is added or removed, or the objects in the current location change.</summary>
- public static class LocationEvents
- {
- /*********
- ** Events
- *********/
- /// <summary>Raised after the player warps to a new location.</summary>
- public static event EventHandler<EventArgsCurrentLocationChanged> CurrentLocationChanged;
-
- /// <summary>Raised after a game location is added or removed.</summary>
- public static event EventHandler<EventArgsGameLocationsChanged> LocationsChanged;
-
- /// <summary>Raised after the list of objects in the current location changes (e.g. an object is added or removed).</summary>
- public static event EventHandler<EventArgsLocationObjectsChanged> LocationObjectsChanged;
-
-
- /*********
- ** Internal methods
- *********/
- /// <summary>Raise a <see cref="CurrentLocationChanged"/> event.</summary>
- /// <param name="monitor">Encapsulates monitoring and logging.</param>
- /// <param name="priorLocation">The player's previous location.</param>
- /// <param name="newLocation">The player's current location.</param>
- 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));
- }
-
- /// <summary>Raise a <see cref="LocationsChanged"/> event.</summary>
- /// <param name="monitor">Encapsulates monitoring and logging.</param>
- /// <param name="newLocations">The current list of game locations.</param>
- internal static void InvokeLocationsChanged(IMonitor monitor, List<GameLocation> newLocations)
- {
- monitor.SafelyRaiseGenericEvent($"{nameof(LocationEvents)}.{nameof(LocationEvents.LocationsChanged)}", LocationEvents.LocationsChanged?.GetInvocationList(), null, new EventArgsGameLocationsChanged(newLocations));
- }
-
- /// <summary>Raise a <see cref="LocationObjectsChanged"/> event.</summary>
- /// <param name="monitor">Encapsulates monitoring and logging.</param>
- /// <param name="newObjects">The current list of objects in the current location.</param>
- internal static void InvokeOnNewLocationObject(IMonitor monitor, SerializableDictionary<Vector2, Object> newObjects)
- {
- monitor.SafelyRaiseGenericEvent($"{nameof(LocationEvents)}.{nameof(LocationEvents.LocationObjectsChanged)}", LocationEvents.LocationObjectsChanged?.GetInvocationList(), null, new EventArgsLocationObjectsChanged(newObjects));
- }
- }
-}