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

build 190712. heating generator state cab controls, engine state ui readout fix, minor ai logic tweaks

This commit is contained in:
tmj-fstate
2019-07-16 10:32:57 +02:00
parent 06b7f009cc
commit 3feca56c08
5 changed files with 46 additions and 25 deletions

View File

@@ -750,17 +750,14 @@ debug_panel::update_vehicle_brake() const {
void
debug_panel::update_section_engine( std::vector<text_line> &Output ) {
if( m_input.train == nullptr ) { return; }
// engine data
if( m_input.vehicle == nullptr ) { return; }
if( m_input.mover == nullptr ) { return; }
auto const &train { *m_input.train };
auto const &vehicle{ *m_input.vehicle };
auto const &mover{ *m_input.mover };
// engine data
// induction motor data
// induction motor data
if( mover.EngineType == TEngineType::ElectricInductionMotor ) {
Output.emplace_back( " eimc: eimv: press:", Global.UITextColor );
@@ -772,7 +769,11 @@ debug_panel::update_section_engine( std::vector<text_line> &Output ) {
+ mover.eimv_labels[ i ] + to_string( mover.eimv[ i ], 2, 9 );
if( i < 10 ) {
parameters += " | " + train.fPress_labels[ i ] + to_string( train.fPress[ i ][ 0 ], 2, 9 );
// NOTE: we pull consist data from the train structure, so show this data only if we're viewing controlled vehicle
parameters +=
( ( m_input.train != nullptr ) && ( m_input.train->Dynamic() == m_input.vehicle ) ?
" | " + TTrain::fPress_labels[ i ] + to_string( m_input.train->fPress[ i ][ 0 ], 2, 9 ) :
"" );
}
else if( i == 12 ) {
parameters += " med:";
@@ -784,6 +785,7 @@ debug_panel::update_section_engine( std::vector<text_line> &Output ) {
Output.emplace_back( parameters, Global.UITextColor );
}
}
// diesel engine data
if( mover.EngineType == TEngineType::DieselEngine ) {
std::string parameterstext = "param value";