mirror of
https://github.com/Pathoschild/SMAPI.git
synced 2026-10-12 02:08:51 +00:00
Be consistent with cache reads vs fresh load
This commit is contained in:
committed by
Jesse Plamondon-Willard
parent
7383dff324
commit
58228984c0
@@ -170,7 +170,11 @@ internal class CoreAssetPropagator
|
||||
Lazy<Texture2D?> newTexture = new(() =>
|
||||
{
|
||||
if (this.DisposableContentManager.DoesAssetExist<Texture2D>(name))
|
||||
return this.DisposableContentManager.LoadLocalized<Texture2D>(name, language, useCache: false);
|
||||
{
|
||||
return forLocalizedAsset
|
||||
? this.DisposableContentManager.LoadLocalized<Texture2D>(name, language, useCache: false)
|
||||
: this.DisposableContentManager.LoadLocalized<Texture2D>(name, name.LanguageCode ?? this.DisposableContentManager.Language, useCache: false);
|
||||
}
|
||||
|
||||
this.Monitor.Log($"Skipped reload for '{name.Name}' because the underlying asset no longer exists.", LogLevel.Warn);
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user