fix error on Mac when a custom map references a vanilla tilesheet that only exists under Content/Maps
This commit is contained in:
parent
2800f7a931
commit
5d0cba90a1
|
@ -3,6 +3,7 @@
|
||||||
These changes have not been released yet.
|
These changes have not been released yet.
|
||||||
|
|
||||||
* For players:
|
* For players:
|
||||||
|
* Fixed error when a custom map references certain vanilla tilesheets on MacOS.
|
||||||
* Fixed compatibility with Arch Linux.
|
* Fixed compatibility with Arch Linux.
|
||||||
|
|
||||||
## 2.11.1
|
## 2.11.1
|
||||||
|
|
|
@ -316,7 +316,7 @@ namespace StardewModdingAPI.Framework.ModHelpers
|
||||||
|
|
||||||
// check relative to content folder
|
// 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")
|
string contentKey = candidateKey.EndsWith(".png")
|
||||||
? candidateKey.Substring(0, candidateKey.Length - 4)
|
? candidateKey.Substring(0, candidateKey.Length - 4)
|
||||||
|
|
Loading…
Reference in New Issue