Fixed lua music files not being recognized. Changed assert on non-optional theme elements not being found to report an error.
This commit is contained in:
@@ -629,7 +629,8 @@ bool ThemeManager::GetPathInfoToRaw( PathInfo &out, const RString &sThemeName_,
|
|||||||
case FT_Xml:
|
case FT_Xml:
|
||||||
case FT_Model:
|
case FT_Model:
|
||||||
case FT_Lua:
|
case FT_Lua:
|
||||||
matches= category == EC_BGANIMATIONS || category == EC_GRAPHICS;
|
matches= category == EC_BGANIMATIONS || category == EC_GRAPHICS
|
||||||
|
|| category == EC_SOUNDS;
|
||||||
break;
|
break;
|
||||||
case FT_Ini:
|
case FT_Ini:
|
||||||
matches= category == EC_FONTS;
|
matches= category == EC_FONTS;
|
||||||
@@ -858,8 +859,13 @@ RString ThemeManager::GetPath( ElementCategory category, const RString &sMetrics
|
|||||||
{
|
{
|
||||||
PathInfo pi;
|
PathInfo pi;
|
||||||
GetPathInfo( pi, category, sMetricsGroup, sElement, bOptional );
|
GetPathInfo( pi, category, sMetricsGroup, sElement, bOptional );
|
||||||
if(!bOptional)
|
if(!bOptional && pi.sResolvedPath.empty())
|
||||||
ASSERT( !pi.sResolvedPath.empty() );
|
{
|
||||||
|
LuaHelpers::ReportScriptErrorFmt("Theme element not found and not "
|
||||||
|
"optional: Category: %s Metrics group: %s Element name: %s.",
|
||||||
|
ElementCategoryToString(category).c_str(), sMetricsGroup.c_str(),
|
||||||
|
sElement.c_str());
|
||||||
|
}
|
||||||
return pi.sResolvedPath;
|
return pi.sResolvedPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user