diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-06-10 21:33:17 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-06-10 21:33:17 -0400 |
commit | 930a871018467683510ba39d092d401d7df50861 (patch) | |
tree | f9be25b311906b51635c8a155ad0c07d59ba9a44 /src/SMAPI/Framework/Events | |
parent | 235d67623de648499db521606e4b9033d35388e5 (diff) | |
download | SMAPI-930a871018467683510ba39d092d401d7df50861.tar.gz SMAPI-930a871018467683510ba39d092d401d7df50861.tar.bz2 SMAPI-930a871018467683510ba39d092d401d7df50861.zip |
add debris list changed event (#310)
Diffstat (limited to 'src/SMAPI/Framework/Events')
-rw-r--r-- | src/SMAPI/Framework/Events/EventManager.cs | 4 | ||||
-rw-r--r-- | src/SMAPI/Framework/Events/ModWorldEvents.cs | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/Events/EventManager.cs b/src/SMAPI/Framework/Events/EventManager.cs index 9f67244a..b05d82ce 100644 --- a/src/SMAPI/Framework/Events/EventManager.cs +++ b/src/SMAPI/Framework/Events/EventManager.cs @@ -20,6 +20,9 @@ namespace StardewModdingAPI.Framework.Events /// <summary>Raised after buildings are added or removed in a location.</summary> public readonly ManagedEvent<WorldBuildingListChangedEventArgs> World_BuildingListChanged; + /// <summary>Raised after debris are added or removed in a location.</summary> + public readonly ManagedEvent<WorldDebrisListChangedEventArgs> World_DebrisListChanged; + /// <summary>Raised after large terrain features (like bushes) are added or removed in a location.</summary> public readonly ManagedEvent<WorldLargeTerrainFeatureListChangedEventArgs> World_LargeTerrainFeatureListChanged; @@ -255,6 +258,7 @@ namespace StardewModdingAPI.Framework.Events this.Input_MouseWheelScrolled = ManageEventOf<InputMouseWheelScrolledEventArgs>(nameof(IModEvents.Input), nameof(IInputEvents.MouseWheelScrolled)); this.World_BuildingListChanged = ManageEventOf<WorldBuildingListChangedEventArgs>(nameof(IModEvents.World), nameof(IWorldEvents.LocationListChanged)); + this.World_DebrisListChanged = ManageEventOf<WorldDebrisListChangedEventArgs>(nameof(IModEvents.World), nameof(IWorldEvents.DebrisListChanged)); this.World_LargeTerrainFeatureListChanged = ManageEventOf<WorldLargeTerrainFeatureListChangedEventArgs>(nameof(IModEvents.World), nameof(IWorldEvents.LargeTerrainFeatureListChanged)); this.World_LocationListChanged = ManageEventOf<WorldLocationListChangedEventArgs>(nameof(IModEvents.World), nameof(IWorldEvents.BuildingListChanged)); this.World_NpcListChanged = ManageEventOf<WorldNpcListChangedEventArgs>(nameof(IModEvents.World), nameof(IWorldEvents.NpcListChanged)); diff --git a/src/SMAPI/Framework/Events/ModWorldEvents.cs b/src/SMAPI/Framework/Events/ModWorldEvents.cs index e1a53e0c..dc9c0f4c 100644 --- a/src/SMAPI/Framework/Events/ModWorldEvents.cs +++ b/src/SMAPI/Framework/Events/ModWorldEvents.cs @@ -23,6 +23,13 @@ namespace StardewModdingAPI.Framework.Events remove => this.EventManager.World_BuildingListChanged.Remove(value); } + /// <summary>Raised after debris are added or removed in a location.</summary> + public event EventHandler<WorldDebrisListChangedEventArgs> DebrisListChanged + { + add => this.EventManager.World_DebrisListChanged.Add(value, this.Mod); + remove => this.EventManager.World_DebrisListChanged.Remove(value); + } + /// <summary>Raised after large terrain features (like bushes) are added or removed in a location.</summary> public event EventHandler<WorldLargeTerrainFeatureListChangedEventArgs> LargeTerrainFeatureListChanged { |