Only show information for realistic acceleration model
This commit is contained in:
@@ -390,7 +390,12 @@ int GetTrainDetailsWndVScroll(VehicleID veh_id, TrainDetailsWindowTabs det_tab)
|
|||||||
for (CargoID i = 0; i < NUM_CARGO; i++) {
|
for (CargoID i = 0; i < NUM_CARGO; i++) {
|
||||||
if (max_cargo[i] > 0) num++; // only count carriages that the train has
|
if (max_cargo[i] > 0) num++; // only count carriages that the train has
|
||||||
}
|
}
|
||||||
num += 5; // needs five more because first line is description string and we have the weight and speed info
|
|
||||||
|
if (_settings_game.vehicle.train_acceleration_model != AM_ORIGINAL) {
|
||||||
|
num += 5; // needs five more because first line is description string and we have the weight and speed info and the feeder share
|
||||||
|
} else {
|
||||||
|
num += 2; // needs one more because first line is description string and we have the feeder share
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
for (const Train *v = Train::Get(veh_id); v != nullptr; v = v->GetNextVehicle()) {
|
for (const Train *v = Train::Get(veh_id); v != nullptr; v = v->GetNextVehicle()) {
|
||||||
GetCargoSummaryOfArticulatedVehicle(v, &_cargo_summary);
|
GetCargoSummaryOfArticulatedVehicle(v, &_cargo_summary);
|
||||||
@@ -584,6 +589,7 @@ void DrawTrainDetails(const Train *v, int left, int right, int y, int vscroll_po
|
|||||||
loaded_weight += weight_without_cargo + train->GetCargoWeight(train->cargo_cap);
|
loaded_weight += weight_without_cargo + train->GetCargoWeight(train->cargo_cap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_settings_game.vehicle.train_acceleration_model != AM_ORIGINAL) {
|
||||||
const int empty_max_speed = GetMaxSpeed(v, empty_weight, v->GetDisplayMaxSpeed());
|
const int empty_max_speed = GetMaxSpeed(v, empty_weight, v->GetDisplayMaxSpeed());
|
||||||
const int loaded_max_speed = GetMaxSpeed(v, loaded_weight, v->GetDisplayMaxSpeed());
|
const int loaded_max_speed = GetMaxSpeed(v, loaded_weight, v->GetDisplayMaxSpeed());
|
||||||
|
|
||||||
@@ -604,6 +610,7 @@ void DrawTrainDetails(const Train *v, int left, int right, int y, int vscroll_po
|
|||||||
if (--vscroll_pos < 0 && vscroll_pos >= -vscroll_cap) {
|
if (--vscroll_pos < 0 && vscroll_pos >= -vscroll_cap) {
|
||||||
y += line_height;
|
y += line_height;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (--vscroll_pos < 0 && vscroll_pos >= -vscroll_cap) {
|
if (--vscroll_pos < 0 && vscroll_pos >= -vscroll_cap) {
|
||||||
DrawString(left, right, y + text_y_offset, STR_VEHICLE_DETAILS_TRAIN_TOTAL_CAPACITY_TEXT);
|
DrawString(left, right, y + text_y_offset, STR_VEHICLE_DETAILS_TRAIN_TOTAL_CAPACITY_TEXT);
|
||||||
|
Reference in New Issue
Block a user