summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-02-19 20:12:15 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-02-19 20:12:15 -0500
commit7521570341b79ea78c590a202fbda55bd6fe06b7 (patch)
tree0eef1ae68ba9d488c746f85ef89532e885bc0c10 /src/StardewModdingAPI
parent5bbebcb46b38c562d0310eba9def31884d0362ce (diff)
downloadSMAPI-7521570341b79ea78c590a202fbda55bd6fe06b7.tar.gz
SMAPI-7521570341b79ea78c590a202fbda55bd6fe06b7.tar.bz2
SMAPI-7521570341b79ea78c590a202fbda55bd6fe06b7.zip
make mod-not-compatible messages shorter
Diffstat (limited to 'src/StardewModdingAPI')
-rw-r--r--src/StardewModdingAPI/Program.cs13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs
index de07e8ad..b14240ca 100644
--- a/src/StardewModdingAPI/Program.cs
+++ b/src/StardewModdingAPI/Program.cs
@@ -418,11 +418,14 @@ namespace StardewModdingAPI
{
if (!compatibility.IsCompatible(manifest.Version))
{
- string reasonPhrase = compatibility.ReasonPhrase ?? "this version is not compatible with the latest version of the game";
- string warning = $"Skipped {compatibility.Name} {manifest.Version} because {reasonPhrase}. Please check for a newer version of the mod here:";
- if (!string.IsNullOrWhiteSpace(compatibility.UpdateUrl))
- warning += $"{Environment.NewLine}- official mod: {compatibility.UpdateUrl}";
- if (!string.IsNullOrWhiteSpace(compatibility.UnofficialUpdateUrl))
+ bool hasOfficialUrl = !string.IsNullOrWhiteSpace(compatibility.UpdateUrl);
+ bool hasUnofficialUrl = !string.IsNullOrWhiteSpace(compatibility.UnofficialUpdateUrl);
+
+ string reasonPhrase = compatibility.ReasonPhrase ?? "it isn't compatible with the latest version of the game";
+ string warning = $"Skipped {compatibility.Name} because {reasonPhrase}. Please check for a version newer than {compatibility.UpperVersion} here:";
+ if (hasOfficialUrl)
+ warning += !hasUnofficialUrl ? $" {compatibility.UpdateUrl}" : $"{Environment.NewLine}- official mod: {compatibility.UpdateUrl}";
+ if (hasUnofficialUrl)
warning += $"{Environment.NewLine}- unofficial update: {compatibility.UnofficialUpdateUrl}";
this.Monitor.Log(warning, LogLevel.Error);