mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
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.
This commit is contained in:
@@ -1333,6 +1333,12 @@ void CGUI::Xeromyces_ReadIcon(const XMBData& xmb, XMBElement element)
|
||||
m_Icons.emplace(name, std::move(icon));
|
||||
}
|
||||
|
||||
void CGUI::ReportMissingIcon(const CStr& name) const
|
||||
{
|
||||
if (m_MissingIconsReported.insert(name).second)
|
||||
LOGWARNING("Trying to use an icon, imgleft or imgright-tag with an undefined icon (\"%s\").", name);
|
||||
}
|
||||
|
||||
void CGUI::Xeromyces_ReadTooltip(const XMBData& xmb, XMBElement element)
|
||||
{
|
||||
std::unique_ptr<IGUIObject> object{std::make_unique<CTooltip>(*this)};
|
||||
|
||||
Reference in New Issue
Block a user