summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Content
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-10-09 17:39:11 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-10-09 17:39:11 -0400
commit037d7e357b169936fa858f6c8b9c1388ca75840b (patch)
treec197acab05a908d2ce36d35e981866715020644c /src/SMAPI/Framework/Content
parent9a15da5a173e5e218c16e2e4ef0af0c98968e1cb (diff)
downloadSMAPI-037d7e357b169936fa858f6c8b9c1388ca75840b.tar.gz
SMAPI-037d7e357b169936fa858f6c8b9c1388ca75840b.tar.bz2
SMAPI-037d7e357b169936fa858f6c8b9c1388ca75840b.zip
set texture name earlier to support mods like SpriteMaster
Diffstat (limited to 'src/SMAPI/Framework/Content')
-rw-r--r--src/SMAPI/Framework/Content/AssetDataForImage.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/Content/AssetDataForImage.cs b/src/SMAPI/Framework/Content/AssetDataForImage.cs
index 0380dd9e..241c09a8 100644
--- a/src/SMAPI/Framework/Content/AssetDataForImage.cs
+++ b/src/SMAPI/Framework/Content/AssetDataForImage.cs
@@ -106,7 +106,7 @@ namespace StardewModdingAPI.Framework.Content
return false;
Texture2D original = this.Data;
- Texture2D texture = new(Game1.graphics.GraphicsDevice, Math.Max(original.Width, minWidth), Math.Max(original.Height, minHeight));
+ Texture2D texture = new Texture2D(Game1.graphics.GraphicsDevice, Math.Max(original.Width, minWidth), Math.Max(original.Height, minHeight)).SetName(original.Name);
this.ReplaceWith(texture);
this.PatchImage(original);
return true;