diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-05-02 18:35:34 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-05-02 18:35:34 -0400 |
commit | 2cc5509e9828fd5194ca6ef7ae9ea23bd3628971 (patch) | |
tree | 8b57edeb029178e519edef922d44a6b87428ff95 /src/SMAPI/Framework | |
parent | eef6a9c2e8d124ad0856a8b351f9cae68e54f6eb (diff) | |
download | SMAPI-2cc5509e9828fd5194ca6ef7ae9ea23bd3628971.tar.gz SMAPI-2cc5509e9828fd5194ca6ef7ae9ea23bd3628971.tar.bz2 SMAPI-2cc5509e9828fd5194ca6ef7ae9ea23bd3628971.zip |
add verbose logs for map tilesheet changes
Diffstat (limited to 'src/SMAPI/Framework')
-rw-r--r-- | src/SMAPI/Framework/ContentManagers/ModContentManager.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/ContentManagers/ModContentManager.cs b/src/SMAPI/Framework/ContentManagers/ModContentManager.cs index f32e3be6..4f6aa775 100644 --- a/src/SMAPI/Framework/ContentManagers/ModContentManager.cs +++ b/src/SMAPI/Framework/ContentManagers/ModContentManager.cs @@ -268,6 +268,7 @@ namespace StardewModdingAPI.Framework.ContentManagers string relativeMapFolder = Path.GetDirectoryName(relativeMapPath) ?? ""; // folder path containing the map, relative to the mod folder // fix tilesheets + this.Monitor.VerboseLog($"Fixing tilesheet paths for map '{relativeMapPath}' from mod '{this.ModName}'..."); foreach (TileSheet tilesheet in map.TileSheets) { // get image source @@ -289,6 +290,9 @@ namespace StardewModdingAPI.Framework.ContentManagers if (!this.TryGetTilesheetAssetName(relativeMapFolder, imageSource, out string assetName, out string error)) throw new SContentLoadException($"{errorPrefix} {error}"); + if (assetName != tilesheet.ImageSource) + this.Monitor.VerboseLog($" Mapped tilesheet '{tilesheet.ImageSource}' to '{assetName}'."); + tilesheet.ImageSource = assetName; } catch (Exception ex) when (!(ex is SContentLoadException)) |