From 07f3f1772f7ed600f68ac34302a92ce0717f6880 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 25 Mar 2019 18:59:36 -0400 Subject: [PATCH] fix error on Mac when a custom map references a vanilla tilesheet that only exists under Content/Maps --- docs/release-notes.md | 1 + src/SMAPI/Framework/ModHelpers/ContentHelper.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index 279cc13a..02681f67 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -5,6 +5,7 @@ These changes have not been released yet. * For players: * Improved performance. * SMAPI now prevents invalid items from breaking menus on hover. + * Fixed error when a custom map references certain vanilla tilesheets on MacOS. * Fixed Save Backup not pruning old backups if they're uncompressed. * Fixed issues when a farmhand reconnects before the game notices they're disconnected. * Fixed 'received message' logs shown in non-developer mode. diff --git a/src/SMAPI/Framework/ModHelpers/ContentHelper.cs b/src/SMAPI/Framework/ModHelpers/ContentHelper.cs index 7c353003..8b86fdeb 100644 --- a/src/SMAPI/Framework/ModHelpers/ContentHelper.cs +++ b/src/SMAPI/Framework/ModHelpers/ContentHelper.cs @@ -316,7 +316,7 @@ namespace StardewModdingAPI.Framework.ModHelpers // check relative to content folder { - foreach (string candidateKey in new[] { imageSource, $@"Maps\{imageSource}" }) + foreach (string candidateKey in new[] { imageSource, Path.Combine("Maps", imageSource) }) { string contentKey = candidateKey.EndsWith(".png") ? candidateKey.Substring(0, candidateKey.Length - 4)