diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-12-21 12:25:27 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-12-21 12:25:27 -0500 |
commit | 71284e7176c55f66754470b19fd74b5b1fda4964 (patch) | |
tree | 848a7ec8c99e0e1f8335fac41f9e417dc1c86e40 /src/SMAPI/Constants.cs | |
parent | 85b947dced10f5398055af36b5fdb6b8d32a6a6b (diff) | |
parent | 872a1d5627f20faece618644db1ae4749e124741 (diff) | |
download | SMAPI-71284e7176c55f66754470b19fd74b5b1fda4964.tar.gz SMAPI-71284e7176c55f66754470b19fd74b5b1fda4964.tar.bz2 SMAPI-71284e7176c55f66754470b19fd74b5b1fda4964.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Constants.cs')
-rw-r--r-- | src/SMAPI/Constants.cs | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs index 88f79811..98d0277b 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> @@ -51,13 +54,13 @@ namespace StardewModdingAPI ** Public ****/ /// <summary>SMAPI's current semantic version.</summary> - public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.7.6"); + public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.8.0"); /// <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> |