summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Framework')
-rw-r--r--src/SMAPI/Framework/Content/AssetDataForImage.cs2
-rw-r--r--src/SMAPI/Framework/ContentCore.cs6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/SMAPI/Framework/Content/AssetDataForImage.cs b/src/SMAPI/Framework/Content/AssetDataForImage.cs
index c665484f..1eef2afb 100644
--- a/src/SMAPI/Framework/Content/AssetDataForImage.cs
+++ b/src/SMAPI/Framework/Content/AssetDataForImage.cs
@@ -58,7 +58,7 @@ namespace StardewModdingAPI.Framework.Content
for (int i = 0; i < sourceData.Length; i++)
{
Color pixel = sourceData[i];
- if (pixel.A != 0) // not transparent
+ if (pixel.A > 4) // not transparent (note: on Linux/Mac, fully transparent pixels may have an alpha up to 4 for some reason)
newData[i] = pixel;
}
sourceData = newData;
diff --git a/src/SMAPI/Framework/ContentCore.cs b/src/SMAPI/Framework/ContentCore.cs
index 85b8db8f..3c7e7b5a 100644
--- a/src/SMAPI/Framework/ContentCore.cs
+++ b/src/SMAPI/Framework/ContentCore.cs
@@ -51,7 +51,7 @@ namespace StardewModdingAPI.Framework
private readonly IDictionary<string, LocalizedContentManager.LanguageCode> LanguageCodes;
/// <summary>Provides metadata for core game assets.</summary>
- private readonly CoreAssets CoreAssets;
+ private readonly CoreAssetPropagator CoreAssets;
/// <summary>The assets currently being intercepted by <see cref="IAssetLoader"/> instances. This is used to prevent infinite loops when a loader loads a new asset.</summary>
private readonly ContextHash<string> AssetsBeingLoaded = new ContextHash<string>();
@@ -103,7 +103,7 @@ namespace StardewModdingAPI.Framework
this.ModContentPrefix = this.GetAssetNameFromFilePath(Constants.ModPath);
// get asset data
- this.CoreAssets = new CoreAssets(this.NormaliseAssetName, reflection);
+ this.CoreAssets = new CoreAssetPropagator(this.NormaliseAssetName, reflection);
this.Locales = this.GetKeyLocales(reflection);
this.LanguageCodes = this.Locales.ToDictionary(p => p.Value, p => p.Key, StringComparer.InvariantCultureIgnoreCase);
}
@@ -368,7 +368,7 @@ namespace StardewModdingAPI.Framework
int reloaded = 0;
foreach (string key in removeAssetNames)
{
- if (this.CoreAssets.ReloadForKey(Game1.content, key)) // use an intercepted content manager
+ if (this.CoreAssets.Propagate(Game1.content, key)) // use an intercepted content manager
reloaded++;
}