mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-06 18:38:36 +01:00
chore(track): log why a material isn't blended at the joints of the tracks
This commit is contained in:
@@ -791,6 +791,21 @@ material_manager::blendable( material_handle const Material ) {
|
|||||||
ErrorLog( "invalid shader: " + std::string( e.what() ) );
|
ErrorLog( "invalid shader: " + std::string( e.what() ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if( false == result ) {
|
||||||
|
// once for each material a track would blend, which of the conditions it fails
|
||||||
|
std::string textures;
|
||||||
|
if( material.shader ) {
|
||||||
|
for( auto const &entry : material.shader->texture_conf ) {
|
||||||
|
textures += ( textures.empty() ? "" : ", " ) + entry.first;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
WriteLog(
|
||||||
|
"track blend: material \"" + material.name + "\" isn't blended:"
|
||||||
|
+ ( material.is_good ? "" : " not good;" )
|
||||||
|
+ ( material.shader ? " a shader with the textures " + textures + ";" : " no shader;" )
|
||||||
|
+ ( material.texture_variants.empty() ? "" : " texture variants;" )
|
||||||
|
+ ( material.update_on_weather_change || material.update_on_season_change ? " changes with the weather or seasons;" : "" ) );
|
||||||
|
}
|
||||||
m_blendables.emplace( Material, result );
|
m_blendables.emplace( Material, result );
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user