16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-20 02:09:19 +02:00

..obviously only for vehicles that have pantographs at all

This commit is contained in:
milek7
2021-01-16 19:52:30 +01:00
parent fdafcbc9be
commit 5d130c7fcf
2 changed files with 8 additions and 4 deletions

View File

@@ -821,8 +821,10 @@ debug_panel::update_section_vehicle( std::vector<text_line> &Output ) {
Output.emplace_back( m_buffer.data(), Global.UITextColor );
std::snprintf(m_buffer.data(), m_buffer.size(), STR_C("Energy consumed from pantographs: %.1f kWh"), mover.EnergyConsumed);
Output.emplace_back( m_buffer.data(), Global.UITextColor );
if( mover.EnginePowerSource.SourceType == TPowerSource::CurrentCollector ) {
std::snprintf(m_buffer.data(), m_buffer.size(), STR_C("Energy consumed from pantographs: %.1f kWh"), mover.EnergyConsumed);
Output.emplace_back( m_buffer.data(), Global.UITextColor );
}
if (!std::isnan(last_time)) {
double dt = Timer::GetTime() - last_time;