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.World_LocationListChanged.Add(value, this.Mod);
remove => this.EventManager.World_LocationListChanged.Remove(value);
}
/// Raised after buildings are added or removed in a location.
public event EventHandler BuildingListChanged
{
add => this.EventManager.World_BuildingListChanged.Add(value, this.Mod);
remove => this.EventManager.World_BuildingListChanged.Remove(value);
}
/// Raised after large terrain features (like bushes) are added or removed in a location.
public event EventHandler LargeTerrainFeatureListChanged
{
add => this.EventManager.World_LargeTerrainFeatureListChanged.Add(value, this.Mod);
remove => this.EventManager.World_LargeTerrainFeatureListChanged.Remove(value);
}
/// Raised after NPCs are added or removed in a location.
public event EventHandler NpcListChanged
{
add => this.EventManager.World_NpcListChanged.Add(value);
remove => this.EventManager.World_NpcListChanged.Remove(value);
}
/// Raised after objects are added or removed in a location.
public event EventHandler ObjectListChanged
{
add => this.EventManager.World_ObjectListChanged.Add(value);
remove => this.EventManager.World_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.World_TerrainFeatureListChanged.Add(value);
remove => this.EventManager.World_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) { }
}
}