diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-07-20 01:23:23 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-07-23 12:13:17 -0400 |
commit | 17fec9034cb2715fb3ddc38eecf7c9681048f32c (patch) | |
tree | 3a83e020bc12725cc70be3738df5b33454723607 /src/StardewModdingAPI | |
parent | 7c1ac555a401819bf01ebe0e515b02416bc49b15 (diff) | |
download | SMAPI-17fec9034cb2715fb3ddc38eecf7c9681048f32c.tar.gz SMAPI-17fec9034cb2715fb3ddc38eecf7c9681048f32c.tar.bz2 SMAPI-17fec9034cb2715fb3ddc38eecf7c9681048f32c.zip |
tweak heuristic skip text, add error if mod doesn't implement Entry
Diffstat (limited to 'src/StardewModdingAPI')
-rw-r--r-- | src/StardewModdingAPI/Program.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs index 08bd2b84..75bb991d 100644 --- a/src/StardewModdingAPI/Program.cs +++ b/src/StardewModdingAPI/Program.cs @@ -649,7 +649,11 @@ namespace StardewModdingAPI } catch (IncompatibleInstructionException ex) { +#if SMAPI_1_x TrackSkip(metadata, $"it's not compatible with the latest version of the game or SMAPI (detected {ex.NounPhrase}). Please check for a newer version of the mod."); +#else + TrackSkip(metadata, $"it's no longer compatible (detected {ex.NounPhrase}). Please check for a newer version of the mod."); +#endif continue; } catch (Exception ex) @@ -791,6 +795,9 @@ namespace StardewModdingAPI // raise deprecation warning for old Entry() methods if (this.DeprecationManager.IsVirtualMethodImplemented(mod.GetType(), typeof(Mod), nameof(Mod.Entry), new[] { typeof(object[]) })) deprecationWarnings.Add(() => this.DeprecationManager.Warn(metadata.DisplayName, $"{nameof(Mod)}.{nameof(Mod.Entry)}(object[]) instead of {nameof(Mod)}.{nameof(Mod.Entry)}({nameof(IModHelper)})", "1.0", DeprecationLevel.PendingRemoval)); +#else + if (!this.DeprecationManager.IsVirtualMethodImplemented(mod.GetType(), typeof(Mod), nameof(Mod.Entry), new[] {typeof(IModHelper)})) + this.Monitor.Log($"{metadata.DisplayName} doesn't implement Entry() and may not work correctly.", LogLevel.Error); #endif } catch (Exception ex) |