diff options
Diffstat (limited to 'src/SMAPI/Framework')
-rw-r--r-- | src/SMAPI/Framework/DeprecationManager.cs | 6 | ||||
-rw-r--r-- | src/SMAPI/Framework/SCore.cs | 26 |
2 files changed, 19 insertions, 13 deletions
diff --git a/src/SMAPI/Framework/DeprecationManager.cs b/src/SMAPI/Framework/DeprecationManager.cs index 0fde67ee..be564c22 100644 --- a/src/SMAPI/Framework/DeprecationManager.cs +++ b/src/SMAPI/Framework/DeprecationManager.cs @@ -35,6 +35,12 @@ namespace StardewModdingAPI.Framework this.ModRegistry = modRegistry; } + /// <summary>Log a deprecation warning for the old-style events.</summary> + public void WarnForOldEvents() + { + this.Warn("legacy events", "2.9", DeprecationLevel.Notice); + } + /// <summary>Log a deprecation warning.</summary> /// <param name="nounPhrase">A noun phrase describing what is deprecated.</param> /// <param name="version">The SMAPI version which deprecated it.</param> diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs index 4b95917b..827ed82c 100644 --- a/src/SMAPI/Framework/SCore.cs +++ b/src/SMAPI/Framework/SCore.cs @@ -181,19 +181,19 @@ namespace StardewModdingAPI.Framework try { // hook up events - ContentEvents.Init(this.EventManager); - ControlEvents.Init(this.EventManager); - GameEvents.Init(this.EventManager); - GraphicsEvents.Init(this.EventManager); - InputEvents.Init(this.EventManager); - LocationEvents.Init(this.EventManager); - MenuEvents.Init(this.EventManager); - MineEvents.Init(this.EventManager); - MultiplayerEvents.Init(this.EventManager); - PlayerEvents.Init(this.EventManager); - SaveEvents.Init(this.EventManager); - SpecialisedEvents.Init(this.EventManager); - TimeEvents.Init(this.EventManager); + ContentEvents.Init(this.EventManager, this.DeprecationManager); + ControlEvents.Init(this.EventManager, this.DeprecationManager); + GameEvents.Init(this.EventManager, this.DeprecationManager); + GraphicsEvents.Init(this.EventManager, this.DeprecationManager); + InputEvents.Init(this.EventManager, this.DeprecationManager); + LocationEvents.Init(this.EventManager, this.DeprecationManager); + MenuEvents.Init(this.EventManager, this.DeprecationManager); + MineEvents.Init(this.EventManager, this.DeprecationManager); + MultiplayerEvents.Init(this.EventManager, this.DeprecationManager); + PlayerEvents.Init(this.EventManager, this.DeprecationManager); + SaveEvents.Init(this.EventManager, this.DeprecationManager); + SpecialisedEvents.Init(this.EventManager, this.DeprecationManager); + TimeEvents.Init(this.EventManager, this.DeprecationManager); // init JSON parser JsonConverter[] converters = { |