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);
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);
remove => this.EventManager.ObjectListChanged.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);
remove => this.EventManager.TerrainFeatureListChanged.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) { }
}
}