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:
12
Train.cpp
12
Train.cpp
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user