summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Program.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-02-23 23:54:50 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-02-23 23:54:50 -0500
commit2ed3b25b6b886092e16980288491b47d7b54a309 (patch)
tree0bb954cab0cbaac4868357a05e781a8dc099142d /src/StardewModdingAPI/Program.cs
parent12cb2d272d54a850d3912e5fb39089c70cae5a9e (diff)
downloadSMAPI-2ed3b25b6b886092e16980288491b47d7b54a309.tar.gz
SMAPI-2ed3b25b6b886092e16980288491b47d7b54a309.tar.bz2
SMAPI-2ed3b25b6b886092e16980288491b47d7b54a309.zip
further group deprecation warnings during mod loading
Diffstat (limited to 'src/StardewModdingAPI/Program.cs')
-rw-r--r--src/StardewModdingAPI/Program.cs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs
index 0394362e..df64de3b 100644
--- a/src/StardewModdingAPI/Program.cs
+++ b/src/StardewModdingAPI/Program.cs
@@ -515,11 +515,6 @@ namespace StardewModdingAPI
}
}
- // log deprecation warnings
- foreach (Action warning in deprecationWarnings)
- warning();
- deprecationWarnings = null;
-
// initialise mods
foreach (Mod mod in this.ModRegistry.GetMods())
{
@@ -531,7 +526,7 @@ namespace StardewModdingAPI
// raise deprecation warning for old Entry() methods
if (this.DeprecationManager.IsVirtualMethodImplemented(mod.GetType(), typeof(Mod), nameof(Mod.Entry), new[] { typeof(object[]) }))
- this.DeprecationManager.Warn(mod.ModManifest.Name, $"{nameof(Mod)}.{nameof(Mod.Entry)}(object[]) instead of {nameof(Mod)}.{nameof(Mod.Entry)}({nameof(IModHelper)})", "1.0", DeprecationLevel.Info);
+ deprecationWarnings.Add(() => this.DeprecationManager.Warn(mod.ModManifest.Name, $"{nameof(Mod)}.{nameof(Mod.Entry)}(object[]) instead of {nameof(Mod)}.{nameof(Mod.Entry)}({nameof(IModHelper)})", "1.0", DeprecationLevel.Info));
}
catch (Exception ex)
{
@@ -541,6 +536,8 @@ namespace StardewModdingAPI
// print result
this.Monitor.Log($"Loaded {modsLoaded} mods.");
+ foreach (Action warning in deprecationWarnings)
+ warning();
Console.Title = $"SMAPI {Constants.ApiVersion} - running Stardew Valley {Game1.version} with {modsLoaded} mods";
}