fix case-sensitive mod ID check

This commit is contained in:
Jesse Plamondon-Willard 2022-06-16 19:21:38 -04:00
parent e8bcbf7e5a
commit 525351e905
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
2 changed files with 2 additions and 1 deletions

View File

@ -17,6 +17,7 @@ See [release highlights](https://www.patreon.com/posts/66986798).
* Newtonsoft.Json 13.0.1 (see [changes](https://github.com/JamesNK/Newtonsoft.Json/releases/tag/13.0.1)); * Newtonsoft.Json 13.0.1 (see [changes](https://github.com/JamesNK/Newtonsoft.Json/releases/tag/13.0.1));
* Pintail 2.2.0. * Pintail 2.2.0.
* Removed transitional `UsePintail` option added in 3.14.0 (now always enabled). * Removed transitional `UsePintail` option added in 3.14.0 (now always enabled).
* Fixed `onBehalfOf` arguments in the new content API being case-sensitive.
* Fixed map edits which change warps sometimes rebuilding the NPC pathfinding cache unnecessarily, which could cause a noticeable delay for players. * Fixed map edits which change warps sometimes rebuilding the NPC pathfinding cache unnecessarily, which could cause a noticeable delay for players.
## 3.14.7 ## 3.14.7

View File

@ -1231,7 +1231,7 @@ namespace StardewModdingAPI.Framework
} }
// make sure it's a content pack for the requesting mod // make sure it's a content pack for the requesting mod
if (!onBehalfOf.IsContentPack || !string.Equals(onBehalfOf.Manifest.ContentPackFor?.UniqueID, mod.Manifest.UniqueID)) if (!onBehalfOf.IsContentPack || !string.Equals(onBehalfOf.Manifest.ContentPackFor?.UniqueID, mod.Manifest.UniqueID, StringComparison.OrdinalIgnoreCase))
{ {
mod.LogAsModOnce($"{errorPrefix}: that isn't a content pack for this mod.", LogLevel.Warn); mod.LogAsModOnce($"{errorPrefix}: that isn't a content pack for this mod.", LogLevel.Warn);
return null; return null;