summaryrefslogtreecommitdiff
path: root/src/SMAPI
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-12-20 22:35:01 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-12-20 22:35:01 -0500
commit8d298991825bbb1c676ba592dd6f7fe0ecbb1e0b (patch)
treea6162431e7a42f6a9115c15c8650e6d5e28bcf3a /src/SMAPI
parent7268cae65c19b7d4378ff5b4453afe0f42b2e241 (diff)
downloadSMAPI-8d298991825bbb1c676ba592dd6f7fe0ecbb1e0b.tar.gz
SMAPI-8d298991825bbb1c676ba592dd6f7fe0ecbb1e0b.tar.bz2
SMAPI-8d298991825bbb1c676ba592dd6f7fe0ecbb1e0b.zip
update for new save naming logic
Diffstat (limited to 'src/SMAPI')
-rw-r--r--src/SMAPI/Constants.cs18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs
index d0f34cee..5aa08887 100644
--- a/src/SMAPI/Constants.cs
+++ b/src/SMAPI/Constants.cs
@@ -275,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>