From a868c577c88ef9f45e6e2c8578b238cc56d402b5 Mon Sep 17 00:00:00 2001 From: Phantomical Date: Sun, 30 Nov 2025 17:48:36 -0800 Subject: [PATCH] Fix check for available texture replacements This would skip replacing textures if there were zero scene specific textures or zero regular textures. It should really be skipping only if both are zero. --- CHANGELOG.md | 4 ++++ src/HUDReplacer/HUDReplacer.cs | 9 +++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd5e411..89c1271 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased +## Fixed +* Fixed a bug where HUDReplacer would not replace any textures if there were + zero scene-specific replacements or zero general replacements. + ## 1.3.2 ### Fixed * Fixed a bug where a replacement with an explicitly specified size would not diff --git a/src/HUDReplacer/HUDReplacer.cs b/src/HUDReplacer/HUDReplacer.cs index 261a0c3..60e8511 100644 --- a/src/HUDReplacer/HUDReplacer.cs +++ b/src/HUDReplacer/HUDReplacer.cs @@ -121,12 +121,9 @@ public void Awake() if (Images is null) LoadTextures(); - if (Images.Count != 0 && SceneImages.Count != 0) - { - Debug.Log("HUDReplacer: Replacing textures..."); - ReplaceTextures(); - Debug.Log("HUDReplacer: Textures have been replaced!"); - } + Debug.Log("HUDReplacer: Replacing textures..."); + ReplaceTextures(); + Debug.Log("HUDReplacer: Textures have been replaced!"); LoadHUDColors(); }