16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 03:09:18 +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

@@ -8377,6 +8377,18 @@ bool TTrain::initialize_gauge(cParser &Parser, std::string const &Label, int con
gauge.AssignDouble(&mvControlled->AnPos);
m_controlmapper.insert( gauge, "shuntmodepower:" );
}
else if( Label == "heatingvoltage:" ) {
if( mvControlled->HeatingPowerSource.SourceType == TPowerSource::Generator ) {
auto &gauge = Cabine[ Cabindex ].Gauge( -1 ); // pierwsza wolna gałka
gauge.Load( Parser, DynamicObject );
gauge.AssignDouble( &(mvControlled->HeatingPowerSource.EngineGenerator.voltage) );
}
}
else if( Label == "heatingcurrent:" ) {
auto &gauge = Cabine[ Cabindex ].Gauge( -1 ); // pierwsza wolna gałka
gauge.Load( Parser, DynamicObject );
gauge.AssignDouble( &( mvControlled->TotalCurrent ) );
}
else
{
// failed to match the label