fix error on Mac when a custom map references a vanilla tilesheet that only exists under Content/Maps

This commit is contained in:
Jesse Plamondon-Willard 2019-03-25 18:59:36 -04:00
parent c158c7fe29
commit 07f3f1772f
No known key found for this signature in database
GPG Key ID: 7D7C8097B62033CE
2 changed files with 2 additions and 1 deletions

View File

@ -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.

View File

@ -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)