diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-12-20 22:35:58 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-12-20 22:35:58 -0500 |
commit | 77002d3e9965d9afa843a95129c6acb5d1c4a283 (patch) | |
tree | b4f4a338945cd3f2cc5881e46fb0dd2b075a79ce /src/SMAPI/Constants.cs | |
parent | 1c70736c00e6e70f46f539cb26b5fd253f4eff3b (diff) | |
parent | 5e2f6f565d6ef5330ea2e8c6a5e796f937289255 (diff) | |
download | SMAPI-77002d3e9965d9afa843a95129c6acb5d1c4a283.tar.gz SMAPI-77002d3e9965d9afa843a95129c6acb5d1c4a283.tar.bz2 SMAPI-77002d3e9965d9afa843a95129c6acb5d1c4a283.zip |
Merge branch 'stardew-valley-1.5' into develop
# Conflicts:
# docs/release-notes.md
Diffstat (limited to 'src/SMAPI/Constants.cs')
-rw-r--r-- | src/SMAPI/Constants.cs | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs index 88f79811..5aa08887 100644 --- a/src/SMAPI/Constants.cs +++ b/src/SMAPI/Constants.cs @@ -39,6 +39,9 @@ namespace StardewModdingAPI /// <summary>The game's assembly name.</summary> internal static string GameAssemblyName => EarlyConstants.Platform == GamePlatform.Windows ? "Stardew Valley" : "StardewValley"; + + /// <summary>The <see cref="Context.ScreenId"/> value which should appear in the SMAPI log, if any.</summary> + internal static int? LogScreenId { get; set; } } /// <summary>Contains SMAPI's constants and assumptions.</summary> @@ -54,10 +57,10 @@ namespace StardewModdingAPI public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.7.6"); /// <summary>The minimum supported version of Stardew Valley.</summary> - public static ISemanticVersion MinimumGameVersion { get; } = new GameVersion("1.4.1"); + public static ISemanticVersion MinimumGameVersion { get; } = new GameVersion("1.5.0"); /// <summary>The maximum supported version of Stardew Valley.</summary> - public static ISemanticVersion MaximumGameVersion { get; } = new GameVersion("1.4.5"); + public static ISemanticVersion MaximumGameVersion { get; } = null; /// <summary>The target game platform.</summary> public static GamePlatform TargetPlatform { get; } = EarlyConstants.Platform; @@ -272,21 +275,13 @@ namespace StardewModdingAPI return null; // get basic info - string playerName; - ulong saveID; - if (Context.LoadStage == LoadStage.SaveParsed) - { - playerName = SaveGame.loaded.player.Name; - saveID = SaveGame.loaded.uniqueIDForThisGame; - } - else - { - playerName = Game1.player.Name; - saveID = Game1.uniqueIDForThisGame; - } + string saveName = Game1.GetSaveGameName(set_value: false); + ulong saveID = Context.LoadStage == LoadStage.SaveParsed + ? SaveGame.loaded.uniqueIDForThisGame + : Game1.uniqueIDForThisGame; // build folder name - return $"{new string(playerName.Where(char.IsLetterOrDigit).ToArray())}_{saveID}"; + return $"{new string(saveName.Where(char.IsLetterOrDigit).ToArray())}_{saveID}"; } /// <summary>Get the path to the current save folder, if any.</summary> |