From cca7bf197079975bf310ca90c03b78d0f77fdf02 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 1 Jun 2018 01:15:26 -0400 Subject: rename new events for clarity (#310) --- src/SMAPI/Events/IWorldEvents.cs | 6 ++-- .../Events/WorldBuildingListChangedEventArgs.cs | 39 +++++++++++++++++++++ src/SMAPI/Events/WorldBuildingsChangedEventArgs.cs | 39 --------------------- .../Events/WorldLocationListChangedEventArgs.cs | 33 ++++++++++++++++++ src/SMAPI/Events/WorldLocationsChangedEventArgs.cs | 33 ------------------ .../Events/WorldObjectListChangedEventArgs.cs | 40 ++++++++++++++++++++++ src/SMAPI/Events/WorldObjectsChangedEventArgs.cs | 40 ---------------------- 7 files changed, 115 insertions(+), 115 deletions(-) create mode 100644 src/SMAPI/Events/WorldBuildingListChangedEventArgs.cs delete mode 100644 src/SMAPI/Events/WorldBuildingsChangedEventArgs.cs create mode 100644 src/SMAPI/Events/WorldLocationListChangedEventArgs.cs delete mode 100644 src/SMAPI/Events/WorldLocationsChangedEventArgs.cs create mode 100644 src/SMAPI/Events/WorldObjectListChangedEventArgs.cs delete mode 100644 src/SMAPI/Events/WorldObjectsChangedEventArgs.cs (limited to 'src/SMAPI/Events') diff --git a/src/SMAPI/Events/IWorldEvents.cs b/src/SMAPI/Events/IWorldEvents.cs index 5c713250..a9a5fe6b 100644 --- a/src/SMAPI/Events/IWorldEvents.cs +++ b/src/SMAPI/Events/IWorldEvents.cs @@ -9,12 +9,12 @@ namespace StardewModdingAPI.Events ** Events *********/ /// Raised after a game location is added or removed. - event EventHandler LocationsChanged; + event EventHandler LocationListChanged; /// Raised after buildings are added or removed in a location. - event EventHandler BuildingsChanged; + event EventHandler BuildingListChanged; /// Raised after objects are added or removed in a location. - event EventHandler ObjectsChanged; + event EventHandler ObjectListChanged; } } diff --git a/src/SMAPI/Events/WorldBuildingListChangedEventArgs.cs b/src/SMAPI/Events/WorldBuildingListChangedEventArgs.cs new file mode 100644 index 00000000..e73b9396 --- /dev/null +++ b/src/SMAPI/Events/WorldBuildingListChangedEventArgs.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using StardewValley; +using StardewValley.Buildings; + +namespace StardewModdingAPI.Events +{ + /// Event arguments for a event. + public class WorldBuildingListChangedEventArgs : EventArgs + { + /********* + ** Accessors + *********/ + /// The location which changed. + public GameLocation Location { get; } + + /// The buildings added to the location. + public IEnumerable Added { get; } + + /// The buildings removed from the location. + public IEnumerable Removed { get; } + + + /********* + ** Public methods + *********/ + /// Construct an instance. + /// The location which changed. + /// The buildings added to the location. + /// The buildings removed from the location. + public WorldBuildingListChangedEventArgs(GameLocation location, IEnumerable added, IEnumerable removed) + { + this.Location = location; + this.Added = added.ToArray(); + this.Removed = removed.ToArray(); + } + } +} diff --git a/src/SMAPI/Events/WorldBuildingsChangedEventArgs.cs b/src/SMAPI/Events/WorldBuildingsChangedEventArgs.cs deleted file mode 100644 index 1f68fd02..00000000 --- a/src/SMAPI/Events/WorldBuildingsChangedEventArgs.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using StardewValley; -using StardewValley.Buildings; - -namespace StardewModdingAPI.Events -{ - /// Event arguments for a event. - public class WorldBuildingsChangedEventArgs : EventArgs - { - /********* - ** Accessors - *********/ - /// The location which changed. - public GameLocation Location { get; } - - /// The buildings added to the location. - public IEnumerable Added { get; } - - /// The buildings removed from the location. - public IEnumerable Removed { get; } - - - /********* - ** Public methods - *********/ - /// Construct an instance. - /// The location which changed. - /// The buildings added to the location. - /// The buildings removed from the location. - public WorldBuildingsChangedEventArgs(GameLocation location, IEnumerable added, IEnumerable removed) - { - this.Location = location; - this.Added = added.ToArray(); - this.Removed = removed.ToArray(); - } - } -} diff --git a/src/SMAPI/Events/WorldLocationListChangedEventArgs.cs b/src/SMAPI/Events/WorldLocationListChangedEventArgs.cs new file mode 100644 index 00000000..8bc26a43 --- /dev/null +++ b/src/SMAPI/Events/WorldLocationListChangedEventArgs.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using StardewValley; + +namespace StardewModdingAPI.Events +{ + /// Event arguments for a event. + public class WorldLocationListChangedEventArgs : EventArgs + { + /********* + ** Accessors + *********/ + /// The added locations. + public IEnumerable Added { get; } + + /// The removed locations. + public IEnumerable Removed { get; } + + + /********* + ** Public methods + *********/ + /// Construct an instance. + /// The added locations. + /// The removed locations. + public WorldLocationListChangedEventArgs(IEnumerable added, IEnumerable removed) + { + this.Added = added.ToArray(); + this.Removed = removed.ToArray(); + } + } +} diff --git a/src/SMAPI/Events/WorldLocationsChangedEventArgs.cs b/src/SMAPI/Events/WorldLocationsChangedEventArgs.cs deleted file mode 100644 index 5cf77959..00000000 --- a/src/SMAPI/Events/WorldLocationsChangedEventArgs.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using StardewValley; - -namespace StardewModdingAPI.Events -{ - /// Event arguments for a event. - public class WorldLocationsChangedEventArgs : EventArgs - { - /********* - ** Accessors - *********/ - /// The added locations. - public IEnumerable Added { get; } - - /// The removed locations. - public IEnumerable Removed { get; } - - - /********* - ** Public methods - *********/ - /// Construct an instance. - /// The added locations. - /// The removed locations. - public WorldLocationsChangedEventArgs(IEnumerable added, IEnumerable removed) - { - this.Added = added.ToArray(); - this.Removed = removed.ToArray(); - } - } -} diff --git a/src/SMAPI/Events/WorldObjectListChangedEventArgs.cs b/src/SMAPI/Events/WorldObjectListChangedEventArgs.cs new file mode 100644 index 00000000..5623a49b --- /dev/null +++ b/src/SMAPI/Events/WorldObjectListChangedEventArgs.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.Xna.Framework; +using StardewValley; +using Object = StardewValley.Object; + +namespace StardewModdingAPI.Events +{ + /// Event arguments for a event. + public class WorldObjectListChangedEventArgs : EventArgs + { + /********* + ** Accessors + *********/ + /// The location which changed. + public GameLocation Location { get; } + + /// The objects added to the location. + public IEnumerable> Added { get; } + + /// The objects removed from the location. + public IEnumerable> Removed { get; } + + + /********* + ** Public methods + *********/ + /// Construct an instance. + /// The location which changed. + /// The objects added to the location. + /// The objects removed from the location. + public WorldObjectListChangedEventArgs(GameLocation location, IEnumerable> added, IEnumerable> removed) + { + this.Location = location; + this.Added = added.ToArray(); + this.Removed = removed.ToArray(); + } + } +} diff --git a/src/SMAPI/Events/WorldObjectsChangedEventArgs.cs b/src/SMAPI/Events/WorldObjectsChangedEventArgs.cs deleted file mode 100644 index fb20acd4..00000000 --- a/src/SMAPI/Events/WorldObjectsChangedEventArgs.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Microsoft.Xna.Framework; -using StardewValley; -using Object = StardewValley.Object; - -namespace StardewModdingAPI.Events -{ - /// Event arguments for a event. - public class WorldObjectsChangedEventArgs : EventArgs - { - /********* - ** Accessors - *********/ - /// The location which changed. - public GameLocation Location { get; } - - /// The objects added to the location. - public IEnumerable> Added { get; } - - /// The objects removed from the location. - public IEnumerable> Removed { get; } - - - /********* - ** Public methods - *********/ - /// Construct an instance. - /// The location which changed. - /// The objects added to the location. - /// The objects removed from the location. - public WorldObjectsChangedEventArgs(GameLocation location, IEnumerable> added, IEnumerable> removed) - { - this.Location = location; - this.Added = added.ToArray(); - this.Removed = removed.ToArray(); - } - } -} -- cgit