summaryrefslogtreecommitdiff
path: root/src/SMAPI/Events/ControlEvents.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2018-12-13 02:00:30 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2018-12-13 02:00:30 -0500
commit6045351395f6b74846a2b18b131f662b88641569 (patch)
tree79dd58dd038c482b3890afc238e708c1b2224436 /src/SMAPI/Events/ControlEvents.cs
parent11787f9fea35ee8597c8a4c028b9c3be42751463 (diff)
downloadSMAPI-6045351395f6b74846a2b18b131f662b88641569.tar.gz
SMAPI-6045351395f6b74846a2b18b131f662b88641569.tar.bz2
SMAPI-6045351395f6b74846a2b18b131f662b88641569.zip
simplify access to deprecation manager for deprecation warnings
Diffstat (limited to 'src/SMAPI/Events/ControlEvents.cs')
-rw-r--r--src/SMAPI/Events/ControlEvents.cs23
1 files changed, 9 insertions, 14 deletions
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;
}
}
}