From 30b4ea8fca523e9c872dcf92a0ef0f6319b1ef32 Mon Sep 17 00:00:00 2001 From: Atrik Date: Thu, 26 Mar 2026 22:25:34 +0100 Subject: [PATCH] Warn only once per missing icon Mods may dynamically request icons (e.g., [icon=\"emblem_${civ}\"], [icon=\"icon_${res}\"]) that don't exist when another mod introduced the new civ or resource but hasn't added that icon. This results in excessive error log spam during normal gameplay. --- source/gui/SettingTypes/CGUIString.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/gui/SettingTypes/CGUIString.cpp b/source/gui/SettingTypes/CGUIString.cpp index 8ffe5f8385..3346db5cd7 100644 --- a/source/gui/SettingTypes/CGUIString.cpp +++ b/source/gui/SettingTypes/CGUIString.cpp @@ -113,7 +113,7 @@ void CGUIString::GenerateTextCall(const CGUI& pGUI, SFeedback& Feedback, CStrInt if (!pGUI.HasIcon(path)) { if (pObject) - LOGERROR("Trying to use an icon, imgleft or imgright-tag with an undefined icon (\"%s\").", path.c_str()); + ONCE_EACH(path, LOGWARNING("Trying to use an icon, imgleft or imgright-tag with an undefined icon (\"%s\").", key)); continue; }