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

build 200525. vehicle control type, coupling logic enhancement, uncoupling cab control, minor bug fixes

This commit is contained in:
tmj-fstate
2020-06-02 00:25:13 +02:00
parent 679741f22f
commit 203cefac8d
15 changed files with 105 additions and 116 deletions

View File

@@ -809,6 +809,7 @@ debug_panel::update_vehicle_coupler( int const Side ) {
// NOTE: mover and vehicle are guaranteed to be valid by the caller
auto const &mover { *( m_input.mover ) };
std::string const controltype{ ( mover.Couplers[ Side ].control_type.empty() ? "[*]" : "[" + mover.Couplers[ Side ].control_type + "]" ) };
std::string couplerstatus { locale::strings[ locale::string::debug_vehicle_none ] };
std::string const adapterstatus { ( mover.Couplers[ Side ].adapter_type == TCouplerType::NoCoupler ? "" : "[A]" ) };
@@ -816,12 +817,13 @@ debug_panel::update_vehicle_coupler( int const Side ) {
if( connected == nullptr ) {
return couplerstatus + " " + adapterstatus;
return controltype + " " + couplerstatus + " " + adapterstatus;
}
std::snprintf(
m_buffer.data(), m_buffer.size(),
"%s %s[%d] (%.1f m)",
"%s %s %s[%d] (%.1f m)",
controltype.c_str(),
connected->name().c_str(),
adapterstatus.c_str(),
mover.Couplers[ Side ].CouplingFlag,