Be consistent with cache reads vs fresh load

This commit is contained in:
SinZ
2025-12-27 12:15:27 -05:00
committed by Jesse Plamondon-Willard
parent 7383dff324
commit 58228984c0
+5 -1
View File
@@ -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;