diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2018-12-16 17:25:58 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2018-12-16 17:25:58 -0500 |
commit | b214a76965d98ca785b64b490533b6bf66371a48 (patch) | |
tree | 76017f8b5762d9cb4e179d32a6b44270e6726051 /src/SMAPI/Events | |
parent | 13ed6decf55a7fd72c34b965397011d3012cb9cc (diff) | |
parent | fd0af5f3c149629b91bbe1651a7bda9564b860eb (diff) | |
download | SMAPI-b214a76965d98ca785b64b490533b6bf66371a48.tar.gz SMAPI-b214a76965d98ca785b64b490533b6bf66371a48.tar.bz2 SMAPI-b214a76965d98ca785b64b490533b6bf66371a48.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Events')
-rw-r--r-- | src/SMAPI/Events/ContentEvents.cs | 9 | ||||
-rw-r--r-- | src/SMAPI/Events/ControlEvents.cs | 23 | ||||
-rw-r--r-- | src/SMAPI/Events/GameEvents.cs | 23 | ||||
-rw-r--r-- | src/SMAPI/Events/GraphicsEvents.cs | 21 | ||||
-rw-r--r-- | src/SMAPI/Events/InputEvents.cs | 11 | ||||
-rw-r--r-- | src/SMAPI/Events/LocationEvents.cs | 13 | ||||
-rw-r--r-- | src/SMAPI/Events/MenuEvents.cs | 11 | ||||
-rw-r--r-- | src/SMAPI/Events/MineEvents.cs | 9 | ||||
-rw-r--r-- | src/SMAPI/Events/MultiplayerEvents.cs | 15 | ||||
-rw-r--r-- | src/SMAPI/Events/PlayerEvents.cs | 13 | ||||
-rw-r--r-- | src/SMAPI/Events/SaveEvents.cs | 19 | ||||
-rw-r--r-- | src/SMAPI/Events/SpecialisedEvents.cs | 9 | ||||
-rw-r--r-- | src/SMAPI/Events/TimeEvents.cs | 11 |
13 files changed, 61 insertions, 126 deletions
diff --git a/src/SMAPI/Events/ContentEvents.cs b/src/SMAPI/Events/ContentEvents.cs index 99369cae..1a2dd526 100644 --- a/src/SMAPI/Events/ContentEvents.cs +++ b/src/SMAPI/Events/ContentEvents.cs @@ -15,9 +15,6 @@ namespace StardewModdingAPI.Events /// <summary>The core event manager.</summary> private static EventManager EventManager; - /// <summary>Manages deprecation warnings.</summary> - private static DeprecationManager DeprecationManager; - /********* ** Events @@ -27,7 +24,7 @@ namespace StardewModdingAPI.Events { add { - ContentEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); ContentEvents.EventManager.Legacy_LocaleChanged.Add(value); } remove => ContentEvents.EventManager.Legacy_LocaleChanged.Remove(value); @@ -39,11 +36,9 @@ namespace StardewModdingAPI.Events *********/ /// <summary>Initialise the events.</summary> /// <param name="eventManager">The core event manager.</param> - /// <param name="deprecationManager">Manages deprecation warnings.</param> - internal static void Init(EventManager eventManager, DeprecationManager deprecationManager) + internal static void Init(EventManager eventManager) { ContentEvents.EventManager = eventManager; - ContentEvents.DeprecationManager = deprecationManager; } } } diff --git a/src/SMAPI/Events/ControlEvents.cs b/src/SMAPI/Events/ControlEvents.cs index 5626ff81..be849f95 100644 --- a/src/SMAPI/Events/ControlEvents.cs +++ b/src/SMAPI/Events/ControlEvents.cs @@ -16,9 +16,6 @@ namespace StardewModdingAPI.Events /// <summary>The core event manager.</summary> private static EventManager EventManager; - /// <summary>Manages deprecation warnings.</summary> - private static DeprecationManager DeprecationManager; - /********* ** Events @@ -28,7 +25,7 @@ namespace StardewModdingAPI.Events { add { - ControlEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); ControlEvents.EventManager.Legacy_KeyboardChanged.Add(value); } remove => ControlEvents.EventManager.Legacy_KeyboardChanged.Remove(value); @@ -39,7 +36,7 @@ namespace StardewModdingAPI.Events { add { - ControlEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); ControlEvents.EventManager.Legacy_KeyPressed.Add(value); } remove => ControlEvents.EventManager.Legacy_KeyPressed.Remove(value); @@ -50,7 +47,7 @@ namespace StardewModdingAPI.Events { add { - ControlEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); ControlEvents.EventManager.Legacy_KeyReleased.Add(value); } remove => ControlEvents.EventManager.Legacy_KeyReleased.Remove(value); @@ -61,7 +58,7 @@ namespace StardewModdingAPI.Events { add { - ControlEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); ControlEvents.EventManager.Legacy_MouseChanged.Add(value); } remove => ControlEvents.EventManager.Legacy_MouseChanged.Remove(value); @@ -72,7 +69,7 @@ namespace StardewModdingAPI.Events { add { - ControlEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); ControlEvents.EventManager.Legacy_ControllerButtonPressed.Add(value); } remove => ControlEvents.EventManager.Legacy_ControllerButtonPressed.Remove(value); @@ -83,7 +80,7 @@ namespace StardewModdingAPI.Events { add { - ControlEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); ControlEvents.EventManager.Legacy_ControllerButtonReleased.Add(value); } remove => ControlEvents.EventManager.Legacy_ControllerButtonReleased.Remove(value); @@ -94,7 +91,7 @@ namespace StardewModdingAPI.Events { add { - ControlEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); ControlEvents.EventManager.Legacy_ControllerTriggerPressed.Add(value); } remove => ControlEvents.EventManager.Legacy_ControllerTriggerPressed.Remove(value); @@ -105,7 +102,7 @@ namespace StardewModdingAPI.Events { add { - ControlEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); ControlEvents.EventManager.Legacy_ControllerTriggerReleased.Add(value); } remove => ControlEvents.EventManager.Legacy_ControllerTriggerReleased.Remove(value); @@ -117,11 +114,9 @@ namespace StardewModdingAPI.Events *********/ /// <summary>Initialise the events.</summary> /// <param name="eventManager">The core event manager.</param> - /// <param name="deprecationManager">Manages deprecation warnings.</param> - internal static void Init(EventManager eventManager, DeprecationManager deprecationManager) + internal static void Init(EventManager eventManager) { ControlEvents.EventManager = eventManager; - ControlEvents.DeprecationManager = deprecationManager; } } } diff --git a/src/SMAPI/Events/GameEvents.cs b/src/SMAPI/Events/GameEvents.cs index 39b77f99..6069a185 100644 --- a/src/SMAPI/Events/GameEvents.cs +++ b/src/SMAPI/Events/GameEvents.cs @@ -15,9 +15,6 @@ namespace StardewModdingAPI.Events /// <summary>The core event manager.</summary> private static EventManager EventManager; - /// <summary>Manages deprecation warnings.</summary> - private static DeprecationManager DeprecationManager; - /********* ** Events @@ -27,7 +24,7 @@ namespace StardewModdingAPI.Events { add { - GameEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); GameEvents.EventManager.Legacy_UpdateTick.Add(value); } remove => GameEvents.EventManager.Legacy_UpdateTick.Remove(value); @@ -38,7 +35,7 @@ namespace StardewModdingAPI.Events { add { - GameEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); GameEvents.EventManager.Legacy_SecondUpdateTick.Add(value); } remove => GameEvents.EventManager.Legacy_SecondUpdateTick.Remove(value); @@ -49,7 +46,7 @@ namespace StardewModdingAPI.Events { add { - GameEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); GameEvents.EventManager.Legacy_FourthUpdateTick.Add(value); } remove => GameEvents.EventManager.Legacy_FourthUpdateTick.Remove(value); @@ -60,7 +57,7 @@ namespace StardewModdingAPI.Events { add { - GameEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); GameEvents.EventManager.Legacy_EighthUpdateTick.Add(value); } remove => GameEvents.EventManager.Legacy_EighthUpdateTick.Remove(value); @@ -71,7 +68,7 @@ namespace StardewModdingAPI.Events { add { - GameEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); GameEvents.EventManager.Legacy_QuarterSecondTick.Add(value); } remove => GameEvents.EventManager.Legacy_QuarterSecondTick.Remove(value); @@ -82,7 +79,7 @@ namespace StardewModdingAPI.Events { add { - GameEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); GameEvents.EventManager.Legacy_HalfSecondTick.Add(value); } remove => GameEvents.EventManager.Legacy_HalfSecondTick.Remove(value); @@ -93,7 +90,7 @@ namespace StardewModdingAPI.Events { add { - GameEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); GameEvents.EventManager.Legacy_OneSecondTick.Add(value); } remove => GameEvents.EventManager.Legacy_OneSecondTick.Remove(value); @@ -104,7 +101,7 @@ namespace StardewModdingAPI.Events { add { - GameEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); GameEvents.EventManager.Legacy_FirstUpdateTick.Add(value); } remove => GameEvents.EventManager.Legacy_FirstUpdateTick.Remove(value); @@ -116,11 +113,9 @@ namespace StardewModdingAPI.Events *********/ /// <summary>Initialise the events.</summary> /// <param name="eventManager">The core event manager.</param> - /// <param name="deprecationManager">Manages deprecation warnings.</param> - internal static void Init(EventManager eventManager, DeprecationManager deprecationManager) + internal static void Init(EventManager eventManager) { GameEvents.EventManager = eventManager; - GameEvents.DeprecationManager = deprecationManager; } } } diff --git a/src/SMAPI/Events/GraphicsEvents.cs b/src/SMAPI/Events/GraphicsEvents.cs index be29bf11..88a32c3f 100644 --- a/src/SMAPI/Events/GraphicsEvents.cs +++ b/src/SMAPI/Events/GraphicsEvents.cs @@ -15,9 +15,6 @@ namespace StardewModdingAPI.Events /// <summary>The core event manager.</summary> private static EventManager EventManager; - /// <summary>Manages deprecation warnings.</summary> - private static DeprecationManager DeprecationManager; - /********* ** Events @@ -27,7 +24,7 @@ namespace StardewModdingAPI.Events { add { - GraphicsEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); GraphicsEvents.EventManager.Legacy_Resize.Add(value); } remove => GraphicsEvents.EventManager.Legacy_Resize.Remove(value); @@ -41,7 +38,7 @@ namespace StardewModdingAPI.Events { add { - GraphicsEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); GraphicsEvents.EventManager.Legacy_OnPreRenderEvent.Add(value); } remove => GraphicsEvents.EventManager.Legacy_OnPreRenderEvent.Remove(value); @@ -52,7 +49,7 @@ namespace StardewModdingAPI.Events { add { - GraphicsEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); GraphicsEvents.EventManager.Legacy_OnPostRenderEvent.Add(value); } remove => GraphicsEvents.EventManager.Legacy_OnPostRenderEvent.Remove(value); @@ -66,7 +63,7 @@ namespace StardewModdingAPI.Events { add { - GraphicsEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); GraphicsEvents.EventManager.Legacy_OnPreRenderHudEvent.Add(value); } remove => GraphicsEvents.EventManager.Legacy_OnPreRenderHudEvent.Remove(value); @@ -77,7 +74,7 @@ namespace StardewModdingAPI.Events { add { - GraphicsEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); GraphicsEvents.EventManager.Legacy_OnPostRenderHudEvent.Add(value); } remove => GraphicsEvents.EventManager.Legacy_OnPostRenderHudEvent.Remove(value); @@ -91,7 +88,7 @@ namespace StardewModdingAPI.Events { add { - GraphicsEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); GraphicsEvents.EventManager.Legacy_OnPreRenderGuiEvent.Add(value); } remove => GraphicsEvents.EventManager.Legacy_OnPreRenderGuiEvent.Remove(value); @@ -102,7 +99,7 @@ namespace StardewModdingAPI.Events { add { - GraphicsEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); GraphicsEvents.EventManager.Legacy_OnPostRenderGuiEvent.Add(value); } remove => GraphicsEvents.EventManager.Legacy_OnPostRenderGuiEvent.Remove(value); @@ -114,11 +111,9 @@ namespace StardewModdingAPI.Events *********/ /// <summary>Initialise the events.</summary> /// <param name="eventManager">The core event manager.</param> - /// <param name="deprecationManager">Manages deprecation warnings.</param> - internal static void Init(EventManager eventManager, DeprecationManager deprecationManager) + internal static void Init(EventManager eventManager) { GraphicsEvents.EventManager = eventManager; - GraphicsEvents.DeprecationManager = deprecationManager; } } } diff --git a/src/SMAPI/Events/InputEvents.cs b/src/SMAPI/Events/InputEvents.cs index 255b9c8a..900e53ea 100644 --- a/src/SMAPI/Events/InputEvents.cs +++ b/src/SMAPI/Events/InputEvents.cs @@ -15,9 +15,6 @@ namespace StardewModdingAPI.Events /// <summary>The core event manager.</summary> private static EventManager EventManager; - /// <summary>Manages deprecation warnings.</summary> - private static DeprecationManager DeprecationManager; - /********* ** Events @@ -27,7 +24,7 @@ namespace StardewModdingAPI.Events { add { - InputEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); InputEvents.EventManager.Legacy_ButtonPressed.Add(value); } remove => InputEvents.EventManager.Legacy_ButtonPressed.Remove(value); @@ -38,7 +35,7 @@ namespace StardewModdingAPI.Events { add { - InputEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); InputEvents.EventManager.Legacy_ButtonReleased.Add(value); } remove => InputEvents.EventManager.Legacy_ButtonReleased.Remove(value); @@ -50,11 +47,9 @@ namespace StardewModdingAPI.Events *********/ /// <summary>Initialise the events.</summary> /// <param name="eventManager">The core event manager.</param> - /// <param name="deprecationManager">Manages deprecation warnings.</param> - internal static void Init(EventManager eventManager, DeprecationManager deprecationManager) + internal static void Init(EventManager eventManager) { InputEvents.EventManager = eventManager; - InputEvents.DeprecationManager = deprecationManager; } } } diff --git a/src/SMAPI/Events/LocationEvents.cs b/src/SMAPI/Events/LocationEvents.cs index e0bcd853..5eb228b7 100644 --- a/src/SMAPI/Events/LocationEvents.cs +++ b/src/SMAPI/Events/LocationEvents.cs @@ -15,9 +15,6 @@ namespace StardewModdingAPI.Events /// <summary>The core event manager.</summary> private static EventManager EventManager; - /// <summary>Manages deprecation warnings.</summary> - private static DeprecationManager DeprecationManager; - /********* ** Events @@ -27,7 +24,7 @@ namespace StardewModdingAPI.Events { add { - LocationEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); LocationEvents.EventManager.Legacy_LocationsChanged.Add(value); } remove => LocationEvents.EventManager.Legacy_LocationsChanged.Remove(value); @@ -38,7 +35,7 @@ namespace StardewModdingAPI.Events { add { - LocationEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); LocationEvents.EventManager.Legacy_BuildingsChanged.Add(value); } remove => LocationEvents.EventManager.Legacy_BuildingsChanged.Remove(value); @@ -49,7 +46,7 @@ namespace StardewModdingAPI.Events { add { - LocationEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); LocationEvents.EventManager.Legacy_ObjectsChanged.Add(value); } remove => LocationEvents.EventManager.Legacy_ObjectsChanged.Remove(value); @@ -61,11 +58,9 @@ namespace StardewModdingAPI.Events *********/ /// <summary>Initialise the events.</summary> /// <param name="eventManager">The core event manager.</param> - /// <param name="deprecationManager">Manages deprecation warnings.</param> - internal static void Init(EventManager eventManager, DeprecationManager deprecationManager) + internal static void Init(EventManager eventManager) { LocationEvents.EventManager = eventManager; - LocationEvents.DeprecationManager = deprecationManager; } } } diff --git a/src/SMAPI/Events/MenuEvents.cs b/src/SMAPI/Events/MenuEvents.cs index e36cb498..914948dd 100644 --- a/src/SMAPI/Events/MenuEvents.cs +++ b/src/SMAPI/Events/MenuEvents.cs @@ -15,9 +15,6 @@ namespace StardewModdingAPI.Events /// <summary>The core event manager.</summary> private static EventManager EventManager; - /// <summary>Manages deprecation warnings.</summary> - private static DeprecationManager DeprecationManager; - /********* ** Events @@ -27,7 +24,7 @@ namespace StardewModdingAPI.Events { add { - MenuEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); MenuEvents.EventManager.Legacy_MenuChanged.Add(value); } remove => MenuEvents.EventManager.Legacy_MenuChanged.Remove(value); @@ -38,7 +35,7 @@ namespace StardewModdingAPI.Events { add { - MenuEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); MenuEvents.EventManager.Legacy_MenuClosed.Add(value); } remove => MenuEvents.EventManager.Legacy_MenuClosed.Remove(value); @@ -50,11 +47,9 @@ namespace StardewModdingAPI.Events *********/ /// <summary>Initialise the events.</summary> /// <param name="eventManager">The core event manager.</param> - /// <param name="deprecationManager">Manages deprecation warnings.</param> - internal static void Init(EventManager eventManager, DeprecationManager deprecationManager) + internal static void Init(EventManager eventManager) { MenuEvents.EventManager = eventManager; - MenuEvents.DeprecationManager = deprecationManager; } } } diff --git a/src/SMAPI/Events/MineEvents.cs b/src/SMAPI/Events/MineEvents.cs index 954c844a..fd35237e 100644 --- a/src/SMAPI/Events/MineEvents.cs +++ b/src/SMAPI/Events/MineEvents.cs @@ -15,9 +15,6 @@ namespace StardewModdingAPI.Events /// <summary>The core event manager.</summary> private static EventManager EventManager; - /// <summary>Manages deprecation warnings.</summary> - private static DeprecationManager DeprecationManager; - /********* ** Events @@ -27,7 +24,7 @@ namespace StardewModdingAPI.Events { add { - MineEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); MineEvents.EventManager.Legacy_MineLevelChanged.Add(value); } remove => MineEvents.EventManager.Legacy_MineLevelChanged.Remove(value); @@ -39,11 +36,9 @@ namespace StardewModdingAPI.Events *********/ /// <summary>Initialise the events.</summary> /// <param name="eventManager">The core event manager.</param> - /// <param name="deprecationManager">Manages deprecation warnings.</param> - internal static void Init(EventManager eventManager, DeprecationManager deprecationManager) + internal static void Init(EventManager eventManager) { MineEvents.EventManager = eventManager; - MineEvents.DeprecationManager = deprecationManager; } } } diff --git a/src/SMAPI/Events/MultiplayerEvents.cs b/src/SMAPI/Events/MultiplayerEvents.cs index 7e8328a4..5e6a22dc 100644 --- a/src/SMAPI/Events/MultiplayerEvents.cs +++ b/src/SMAPI/Events/MultiplayerEvents.cs @@ -15,9 +15,6 @@ namespace StardewModdingAPI.Events /// <summary>The core event manager.</summary> private static EventManager EventManager; - /// <summary>Manages deprecation warnings.</summary> - private static DeprecationManager DeprecationManager; - /********* ** Events @@ -27,7 +24,7 @@ namespace StardewModdingAPI.Events { add { - MultiplayerEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); MultiplayerEvents.EventManager.Legacy_BeforeMainSync.Add(value); } remove => MultiplayerEvents.EventManager.Legacy_BeforeMainSync.Remove(value); @@ -38,7 +35,7 @@ namespace StardewModdingAPI.Events { add { - MultiplayerEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); MultiplayerEvents.EventManager.Legacy_AfterMainSync.Add(value); } remove => MultiplayerEvents.EventManager.Legacy_AfterMainSync.Remove(value); @@ -49,7 +46,7 @@ namespace StardewModdingAPI.Events { add { - MultiplayerEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); MultiplayerEvents.EventManager.Legacy_BeforeMainBroadcast.Add(value); } remove => MultiplayerEvents.EventManager.Legacy_BeforeMainBroadcast.Remove(value); @@ -60,7 +57,7 @@ namespace StardewModdingAPI.Events { add { - MultiplayerEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); MultiplayerEvents.EventManager.Legacy_AfterMainBroadcast.Add(value); } remove => MultiplayerEvents.EventManager.Legacy_AfterMainBroadcast.Remove(value); @@ -72,11 +69,9 @@ namespace StardewModdingAPI.Events *********/ /// <summary>Initialise the events.</summary> /// <param name="eventManager">The core event manager.</param> - /// <param name="deprecationManager">Manages deprecation warnings.</param> - internal static void Init(EventManager eventManager, DeprecationManager deprecationManager) + internal static void Init(EventManager eventManager) { MultiplayerEvents.EventManager = eventManager; - MultiplayerEvents.DeprecationManager = deprecationManager; } } } diff --git a/src/SMAPI/Events/PlayerEvents.cs b/src/SMAPI/Events/PlayerEvents.cs index 1193675f..98bc3da5 100644 --- a/src/SMAPI/Events/PlayerEvents.cs +++ b/src/SMAPI/Events/PlayerEvents.cs @@ -15,9 +15,6 @@ namespace StardewModdingAPI.Events /// <summary>The core event manager.</summary> private static EventManager EventManager; - /// <summary>Manages deprecation warnings.</summary> - private static DeprecationManager DeprecationManager; - /********* ** Events @@ -27,7 +24,7 @@ namespace StardewModdingAPI.Events { add { - PlayerEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); PlayerEvents.EventManager.Legacy_InventoryChanged.Add(value); } remove => PlayerEvents.EventManager.Legacy_InventoryChanged.Remove(value); @@ -38,7 +35,7 @@ namespace StardewModdingAPI.Events { add { - PlayerEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); PlayerEvents.EventManager.Legacy_LeveledUp.Add(value); } remove => PlayerEvents.EventManager.Legacy_LeveledUp.Remove(value); @@ -49,7 +46,7 @@ namespace StardewModdingAPI.Events { add { - PlayerEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); PlayerEvents.EventManager.Legacy_PlayerWarped.Add(value); } remove => PlayerEvents.EventManager.Legacy_PlayerWarped.Remove(value); @@ -62,11 +59,9 @@ namespace StardewModdingAPI.Events *********/ /// <summary>Initialise the events.</summary> /// <param name="eventManager">The core event manager.</param> - /// <param name="deprecationManager">Manages deprecation warnings.</param> - internal static void Init(EventManager eventManager, DeprecationManager deprecationManager) + internal static void Init(EventManager eventManager) { PlayerEvents.EventManager = eventManager; - PlayerEvents.DeprecationManager = deprecationManager; } } } diff --git a/src/SMAPI/Events/SaveEvents.cs b/src/SMAPI/Events/SaveEvents.cs index 156d3047..959fb5d2 100644 --- a/src/SMAPI/Events/SaveEvents.cs +++ b/src/SMAPI/Events/SaveEvents.cs @@ -15,9 +15,6 @@ namespace StardewModdingAPI.Events /// <summary>The core event manager.</summary> private static EventManager EventManager; - /// <summary>Manages deprecation warnings.</summary> - private static DeprecationManager DeprecationManager; - /********* ** Events @@ -27,7 +24,7 @@ namespace StardewModdingAPI.Events { add { - SaveEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); SaveEvents.EventManager.Legacy_BeforeCreateSave.Add(value); } remove => SaveEvents.EventManager.Legacy_BeforeCreateSave.Remove(value); @@ -38,7 +35,7 @@ namespace StardewModdingAPI.Events { add { - SaveEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); SaveEvents.EventManager.Legacy_AfterCreateSave.Add(value); } remove => SaveEvents.EventManager.Legacy_AfterCreateSave.Remove(value); @@ -49,7 +46,7 @@ namespace StardewModdingAPI.Events { add { - SaveEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); SaveEvents.EventManager.Legacy_BeforeSave.Add(value); } remove => SaveEvents.EventManager.Legacy_BeforeSave.Remove(value); @@ -60,7 +57,7 @@ namespace StardewModdingAPI.Events { add { - SaveEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); SaveEvents.EventManager.Legacy_AfterSave.Add(value); } remove => SaveEvents.EventManager.Legacy_AfterSave.Remove(value); @@ -71,7 +68,7 @@ namespace StardewModdingAPI.Events { add { - SaveEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); SaveEvents.EventManager.Legacy_AfterLoad.Add(value); } remove => SaveEvents.EventManager.Legacy_AfterLoad.Remove(value); @@ -82,7 +79,7 @@ namespace StardewModdingAPI.Events { add { - SaveEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); SaveEvents.EventManager.Legacy_AfterReturnToTitle.Add(value); } remove => SaveEvents.EventManager.Legacy_AfterReturnToTitle.Remove(value); @@ -94,11 +91,9 @@ namespace StardewModdingAPI.Events *********/ /// <summary>Initialise the events.</summary> /// <param name="eventManager">The core event manager.</param> - /// <param name="deprecationManager">Manages deprecation warnings.</param> - internal static void Init(EventManager eventManager, DeprecationManager deprecationManager) + internal static void Init(EventManager eventManager) { SaveEvents.EventManager = eventManager; - SaveEvents.DeprecationManager = deprecationManager; } } } diff --git a/src/SMAPI/Events/SpecialisedEvents.cs b/src/SMAPI/Events/SpecialisedEvents.cs index 0dd726e9..2c6d0230 100644 --- a/src/SMAPI/Events/SpecialisedEvents.cs +++ b/src/SMAPI/Events/SpecialisedEvents.cs @@ -15,9 +15,6 @@ namespace StardewModdingAPI.Events /// <summary>The core event manager.</summary> private static EventManager EventManager; - /// <summary>Manages deprecation warnings.</summary> - private static DeprecationManager DeprecationManager; - /********* ** Events @@ -27,7 +24,7 @@ namespace StardewModdingAPI.Events { add { - SpecialisedEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); SpecialisedEvents.EventManager.Legacy_UnvalidatedUpdateTick.Add(value); } remove => SpecialisedEvents.EventManager.Legacy_UnvalidatedUpdateTick.Remove(value); @@ -39,11 +36,9 @@ namespace StardewModdingAPI.Events *********/ /// <summary>Initialise the events.</summary> /// <param name="eventManager">The core event manager.</param> - /// <param name="deprecationManager">Manages deprecation warnings.</param> - internal static void Init(EventManager eventManager, DeprecationManager deprecationManager) + internal static void Init(EventManager eventManager) { SpecialisedEvents.EventManager = eventManager; - SpecialisedEvents.DeprecationManager = deprecationManager; } } } diff --git a/src/SMAPI/Events/TimeEvents.cs b/src/SMAPI/Events/TimeEvents.cs index 61491dc8..40892491 100644 --- a/src/SMAPI/Events/TimeEvents.cs +++ b/src/SMAPI/Events/TimeEvents.cs @@ -15,9 +15,6 @@ namespace StardewModdingAPI.Events /// <summary>The core event manager.</summary> private static EventManager EventManager; - /// <summary>Manages deprecation warnings.</summary> - private static DeprecationManager DeprecationManager; - /********* ** Events @@ -27,7 +24,7 @@ namespace StardewModdingAPI.Events { add { - TimeEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); TimeEvents.EventManager.Legacy_AfterDayStarted.Add(value); } remove => TimeEvents.EventManager.Legacy_AfterDayStarted.Remove(value); @@ -38,7 +35,7 @@ namespace StardewModdingAPI.Events { add { - TimeEvents.DeprecationManager.WarnForOldEvents(); + SCore.DeprecationManager.WarnForOldEvents(); TimeEvents.EventManager.Legacy_TimeOfDayChanged.Add(value); } remove => TimeEvents.EventManager.Legacy_TimeOfDayChanged.Remove(value); @@ -50,11 +47,9 @@ namespace StardewModdingAPI.Events *********/ /// <summary>Initialise the events.</summary> /// <param name="eventManager">The core event manager.</param> - /// <param name="deprecationManager">Manages deprecation warnings.</param> - internal static void Init(EventManager eventManager, DeprecationManager deprecationManager) + internal static void Init(EventManager eventManager) { TimeEvents.EventManager = eventManager; - TimeEvents.DeprecationManager = deprecationManager; } } } |