#if !SMAPI_3_0_STRICT
using System;
using StardewModdingAPI.Framework;
using StardewModdingAPI.Framework.Events;
namespace StardewModdingAPI.Events
{
/// Events raised when something happens in the mines.
[Obsolete("Use " + nameof(Mod.Helper) + "." + nameof(IModHelper.Events) + " instead. See https://smapi.io/3.0 for more info.")]
public static class MineEvents
{
/*********
** Properties
*********/
/// The core event manager.
private static EventManager EventManager;
/// Manages deprecation warnings.
private static DeprecationManager DeprecationManager;
/*********
** Events
*********/
/// Raised after the player warps to a new level of the mine.
public static event EventHandler MineLevelChanged
{
add
{
MineEvents.DeprecationManager.WarnForOldEvents();
MineEvents.EventManager.Legacy_MineLevelChanged.Add(value);
}
remove => MineEvents.EventManager.Legacy_MineLevelChanged.Remove(value);
}
/*********
** Public methods
*********/
/// Initialise the events.
/// The core event manager.
/// Manages deprecation warnings.
internal static void Init(EventManager eventManager, DeprecationManager deprecationManager)
{
MineEvents.EventManager = eventManager;
MineEvents.DeprecationManager = deprecationManager;
}
}
}
#endif