mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 22:59:19 +02:00
build 190215. timetable consist data tweaks
This commit is contained in:
@@ -1030,9 +1030,9 @@ TCommandType TController::TableUpdate(double &fVelDes, double &fDist, double &fN
|
|||||||
+ ": at " + std::to_string(simulation::Time.data().wHour) + ":" + std::to_string(simulation::Time.data().wMinute)
|
+ ": at " + std::to_string(simulation::Time.data().wHour) + ":" + std::to_string(simulation::Time.data().wMinute)
|
||||||
+ " next " + asNextStop); // informacja
|
+ " next " + asNextStop); // informacja
|
||||||
#endif
|
#endif
|
||||||
// update brake settings and ai braking tables
|
// update consist weight, brake settings and ai braking tables
|
||||||
// NOTE: this calculation is expected to run after completing loading/unloading
|
// NOTE: this calculation is expected to run after completing loading/unloading
|
||||||
AutoRewident(); // nastawianie hamulca do jazdy pociągowej
|
CheckVehicles(); // nastawianie hamulca do jazdy pociągowej
|
||||||
|
|
||||||
if( static_cast<int>( std::floor( std::abs( sSpeedTable[ i ].evEvent->input_value( 1 ) ) ) ) % 2 ) {
|
if( static_cast<int>( std::floor( std::abs( sSpeedTable[ i ].evEvent->input_value( 1 ) ) ) ) % 2 ) {
|
||||||
// nie podjeżdżać do semafora, jeśli droga nie jest wolna
|
// nie podjeżdżać do semafora, jeśli droga nie jest wolna
|
||||||
|
|||||||
@@ -207,29 +207,47 @@ timetable_panel::update() {
|
|||||||
auto textline = " -> " + nextstation;
|
auto textline = " -> " + nextstation;
|
||||||
|
|
||||||
text_lines.emplace_back( textline, Global.UITextColor );
|
text_lines.emplace_back( textline, Global.UITextColor );
|
||||||
|
text_lines.emplace_back( "", Global.UITextColor );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( is_expanded ) {
|
if( is_expanded ) {
|
||||||
|
|
||||||
text_lines.emplace_back( "", Global.UITextColor );
|
if( vehicle->MoverParameters->CategoryFlag == 1 ) {
|
||||||
|
// consist data
|
||||||
|
auto consistmass { owner->fMass };
|
||||||
|
auto consistlength { owner->fLength };
|
||||||
|
if( ( owner->mvControlling->TrainType != dt_DMU )
|
||||||
|
&& ( owner->mvControlling->TrainType != dt_EZT )
|
||||||
|
&& ( owner->pVehicles[end::front] != owner->pVehicles[end::rear] ) ) {
|
||||||
|
//odejmij lokomotywy czynne, a przynajmniej aktualną
|
||||||
|
consistmass -= owner->pVehicle->MoverParameters->TotalMass;
|
||||||
|
// subtract potential other half of a two-part vehicle
|
||||||
|
auto const *previous { owner->pVehicle->PrevC( coupling::permanent ) };
|
||||||
|
if( previous != nullptr ) { consistmass -= previous->MoverParameters->TotalMass; }
|
||||||
|
auto const *next { owner->pVehicle->NextC( coupling::permanent ) };
|
||||||
|
if( next != nullptr ) { consistmass -= next->MoverParameters->TotalMass; }
|
||||||
|
// consistlength -= owner->pVehicle->MoverParameters->Dim.L;
|
||||||
|
}
|
||||||
|
std::snprintf(
|
||||||
|
m_buffer.data(), m_buffer.size(),
|
||||||
|
locale::strings[ locale::string::driver_timetable_consistdata ].c_str(),
|
||||||
|
static_cast<int>( table->LocLoad ),
|
||||||
|
static_cast<int>( consistmass / 1000 ),
|
||||||
|
static_cast<int>( consistlength ) );
|
||||||
|
|
||||||
|
text_lines.emplace_back( m_buffer.data(), Global.UITextColor );
|
||||||
|
text_lines.emplace_back( "", Global.UITextColor );
|
||||||
|
}
|
||||||
|
|
||||||
if( 0 == table->StationCount ) {
|
if( 0 == table->StationCount ) {
|
||||||
// only bother if there's stations to list
|
// only bother if there's stations to list
|
||||||
text_lines.emplace_back( locale::strings[ locale::string::driver_timetable_notimetable ], Global.UITextColor );
|
text_lines.emplace_back( locale::strings[ locale::string::driver_timetable_notimetable ], Global.UITextColor );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
auto const readycolor { glm::vec4( 84.0f / 255.0f, 164.0f / 255.0f, 132.0f / 255.0f, 1.f ) };
|
auto const readycolor { glm::vec4( 84.0f / 255.0f, 164.0f / 255.0f, 132.0f / 255.0f, 1.f ) };
|
||||||
|
|
||||||
text_lines.emplace_back("Brutto rozkl. " + to_string(table->LocLoad), Global.UITextColor);
|
|
||||||
auto fMass = owner->fMass / 1000;
|
|
||||||
if (owner->mvControlling->TrainType & (dt_DMU + dt_EZT) == 0)
|
|
||||||
{
|
|
||||||
//odejmij lokomotywy czynne, a przynajmniej aktualną
|
|
||||||
}
|
|
||||||
text_lines.emplace_back("Brutto rzecz. " + to_string(fMass,0), Global.UITextColor);
|
|
||||||
text_lines.emplace_back("Dl.poc. rzecz. " + to_string(owner->fLength,0), Global.UITextColor);
|
|
||||||
|
|
||||||
// header
|
// header
|
||||||
text_lines.emplace_back( "+-----+------------------------------------+-------+-----+", Global.UITextColor );
|
text_lines.emplace_back( "+-----+------------------------------------+-------+-----+", Global.UITextColor );
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ init() {
|
|||||||
"Timetable",
|
"Timetable",
|
||||||
"Time: %d:%02d:%02d",
|
"Time: %d:%02d:%02d",
|
||||||
"(no timetable)",
|
"(no timetable)",
|
||||||
|
"Consist weight: %d t (specified) %d t (actual)\nConsist length: %d m",
|
||||||
|
|
||||||
"Transcripts",
|
"Transcripts",
|
||||||
|
|
||||||
@@ -183,6 +184,7 @@ init() {
|
|||||||
"Rozklad jazdy",
|
"Rozklad jazdy",
|
||||||
"Godzina: %d:%02d:%02d",
|
"Godzina: %d:%02d:%02d",
|
||||||
"(brak rozkladu)",
|
"(brak rozkladu)",
|
||||||
|
"Brutto: %d t (rozkladowe) %d t (rzeczywiste)\nDlugosc pociagu: %d m",
|
||||||
|
|
||||||
"Transkrypcje",
|
"Transkrypcje",
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ enum string {
|
|||||||
driver_timetable_header,
|
driver_timetable_header,
|
||||||
driver_timetable_time,
|
driver_timetable_time,
|
||||||
driver_timetable_notimetable,
|
driver_timetable_notimetable,
|
||||||
|
driver_timetable_consistdata,
|
||||||
|
|
||||||
driver_transcripts_header,
|
driver_transcripts_header,
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user