add new game build number to the SMAPI log
This commit is contained in:
parent
0d7d447600
commit
52f4df3f30
|
@ -4,6 +4,7 @@
|
|||
## Upcoming release
|
||||
* For players:
|
||||
* SMAPI now auto-fixes maps loaded without a required tilesheet to prevent errors.
|
||||
* Added the new game build number to the SMAPI console + log.
|
||||
* Fixed outdated instructions in Steam error message.
|
||||
* Simplified [running without a terminal on Linux/macOS](https://stardewvalleywiki.com/Modding:Player_Guide/Troubleshooting#SMAPI_doesn.27t_recognize_controller_.28Steam_only.29) when needed.
|
||||
* Updated compatibility list.
|
||||
|
|
|
@ -340,5 +340,16 @@ namespace StardewModdingAPI
|
|||
// if save doesn't exist yet, return the default one we expect to be created
|
||||
return folder;
|
||||
}
|
||||
|
||||
/// <summary>Get a display label for the game's build number.</summary>
|
||||
internal static string GetBuildVersionLabel()
|
||||
{
|
||||
string version = typeof(Game1).Assembly.GetName().Version?.ToString() ?? "unknown";
|
||||
|
||||
if (version.StartsWith($"{Game1.version}."))
|
||||
version = version.Substring(Game1.version.Length + 1);
|
||||
|
||||
return version;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -262,7 +262,7 @@ namespace StardewModdingAPI.Framework.Logging
|
|||
public void LogIntro(string modsPath, IDictionary<string, object> customSettings)
|
||||
{
|
||||
// log platform
|
||||
this.Monitor.Log($"SMAPI {Constants.ApiVersion} with Stardew Valley {Constants.GameVersion} on {EnvironmentUtility.GetFriendlyPlatformName(Constants.Platform)}", LogLevel.Info);
|
||||
this.Monitor.Log($"SMAPI {Constants.ApiVersion} with Stardew Valley {Constants.GameVersion} (build {Constants.GetBuildVersionLabel()}) on {EnvironmentUtility.GetFriendlyPlatformName(Constants.Platform)}", LogLevel.Info);
|
||||
|
||||
// log basic info
|
||||
this.Monitor.Log($"Mods go here: {modsPath}", LogLevel.Info);
|
||||
|
|
Loading…
Reference in New Issue