using System; using StardewModdingAPI.Events; namespace StardewModdingAPI.Framework.Events { /// Events raised when something changes in the world. internal class ModWorldEvents : ModEventsBase, IWorldEvents { /********* ** Accessors *********/ /// Raised after a game location is added or removed. public event EventHandler LocationListChanged { add => this.EventManager.LocationListChanged.Add(value, this.Mod); remove => this.EventManager.LocationListChanged.Remove(value); } /// Raised after buildings are added or removed in a location. public event EventHandler BuildingListChanged { add => this.EventManager.BuildingListChanged.Add(value, this.Mod); remove => this.EventManager.BuildingListChanged.Remove(value); } /// Raised after debris are added or removed in a location. public event EventHandler DebrisListChanged { add => this.EventManager.DebrisListChanged.Add(value, this.Mod); remove => this.EventManager.DebrisListChanged.Remove(value); } /// Raised after large terrain features (like bushes) are added or removed in a location. public event EventHandler LargeTerrainFeatureListChanged { add => this.EventManager.LargeTerrainFeatureListChanged.Add(value, this.Mod); remove => this.EventManager.LargeTerrainFeatureListChanged.Remove(value); } /// Raised after NPCs are added or removed in a location. public event EventHandler NpcListChanged { add => this.EventManager.NpcListChanged.Add(value, this.Mod); remove => this.EventManager.NpcListChanged.Remove(value); } /// Raised after objects are added or removed in a location. public event EventHandler ObjectListChanged { add => this.EventManager.ObjectListChanged.Add(value, this.Mod); remove => this.EventManager.ObjectListChanged.Remove(value); } /// Raised after items are added or removed from a chest. public event EventHandler ChestInventoryChanged { add => this.EventManager.ChestInventoryChanged.Add(value, this.Mod); remove => this.EventManager.ChestInventoryChanged.Remove(value); } /// Raised after terrain features (like floors and trees) are added or removed in a location. public event EventHandler TerrainFeatureListChanged { add => this.EventManager.TerrainFeatureListChanged.Add(value, this.Mod); remove => this.EventManager.TerrainFeatureListChanged.Remove(value); } /// Raised after furniture are added or removed in a location. public event EventHandler FurnitureListChanged { add => this.EventManager.FurnitureListChanged.Add(value, this.Mod); remove => this.EventManager.FurnitureListChanged.Remove(value); } /********* ** Public methods *********/ /// Construct an instance. /// The mod which uses this instance. /// The underlying event manager. internal ModWorldEvents(IModMetadata mod, EventManager eventManager) : base(mod, eventManager) { } } }