summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Program.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-02-24 00:15:45 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-02-24 00:15:45 -0500
commitbe0aa19f30ac1168214f0dcf39a37587e8f4abb3 (patch)
tree66e0617535f47b8940dd054e89b9912e98431a2e /src/StardewModdingAPI/Program.cs
parent2ed3b25b6b886092e16980288491b47d7b54a309 (diff)
downloadSMAPI-be0aa19f30ac1168214f0dcf39a37587e8f4abb3.tar.gz
SMAPI-be0aa19f30ac1168214f0dcf39a37587e8f4abb3.tar.bz2
SMAPI-be0aa19f30ac1168214f0dcf39a37587e8f4abb3.zip
fix game version always being detected as 1.2.9 because Game1.version is a const now
Diffstat (limited to 'src/StardewModdingAPI/Program.cs')
-rw-r--r--src/StardewModdingAPI/Program.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs
index df64de3b..3431e02f 100644
--- a/src/StardewModdingAPI/Program.cs
+++ b/src/StardewModdingAPI/Program.cs
@@ -102,8 +102,8 @@ namespace StardewModdingAPI
{
// initialise logging
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB"); // for consistent log formatting
- this.Monitor.Log($"SMAPI {Constants.ApiVersion} with Stardew Valley {Game1.version} on {Environment.OSVersion}", LogLevel.Info);
- Console.Title = $"SMAPI {Constants.ApiVersion} - running Stardew Valley {Game1.version}";
+ this.Monitor.Log($"SMAPI {Constants.ApiVersion} with Stardew Valley {Constants.GameVersion} on {Environment.OSVersion}", LogLevel.Info);
+ Console.Title = $"SMAPI {Constants.ApiVersion} - running Stardew Valley {Constants.GameVersion}";
// inject compatibility shims
#pragma warning disable 618
@@ -142,9 +142,9 @@ namespace StardewModdingAPI
try
{
// verify version
- if (string.Compare(Game1.version, Constants.MinimumGameVersion, StringComparison.InvariantCultureIgnoreCase) < 0)
+ if (string.Compare(Constants.GameVersion, Constants.MinimumGameVersion, StringComparison.InvariantCultureIgnoreCase) < 0)
{
- this.Monitor.Log($"Oops! You're running Stardew Valley {Game1.version}, but the oldest supported version is {Constants.MinimumGameVersion}. Please update your game before using SMAPI. If you're on the Steam beta channel, note that the beta channel may not receive the latest updates.", LogLevel.Error);
+ this.Monitor.Log($"Oops! You're running Stardew Valley {Constants.GameVersion}, but the oldest supported version is {Constants.MinimumGameVersion}. Please update your game before using SMAPI. If you're on the Steam beta channel, note that the beta channel may not receive the latest updates.", LogLevel.Error);
return;
}
@@ -245,7 +245,7 @@ namespace StardewModdingAPI
this.GameInstance = new SGame(this.Monitor);
this.GameInstance.Exiting += (sender, e) => this.IsGameRunning = false;
this.GameInstance.Window.ClientSizeChanged += (sender, e) => GraphicsEvents.InvokeResize(this.Monitor, sender, e);
- this.GameInstance.Window.Title = $"Stardew Valley {Game1.version}";
+ this.GameInstance.Window.Title = $"Stardew Valley {Constants.GameVersion}";
gameProgramType.GetField("gamePtr").SetValue(gameProgramType, this.GameInstance);
// configure
@@ -538,7 +538,7 @@ namespace StardewModdingAPI
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";
+ Console.Title = $"SMAPI {Constants.ApiVersion} - running Stardew Valley {Constants.GameVersion} with {modsLoaded} mods";
}
/// <summary>Run a loop handling console input.</summary>