Fix #299: Add estimated max speed (full) to template windows

This commit is contained in:
Jonathan G Rennison
2021-07-17 23:12:00 +01:00
parent 502af119e5
commit 6a009686c9
10 changed files with 39 additions and 8 deletions

View File

@@ -340,6 +340,11 @@ public:
}
DrawString(8, r.right, y, STR_VEHICLE_INFO_FULL_WEIGHT_WITH_RATIOS);
}
if (_settings_game.vehicle.train_acceleration_model != AM_ORIGINAL) {
y += FONT_HEIGHT_NORMAL;
SetDParam(0, GetTrainEstimatedMaxAchievableSpeed(this->virtual_train, gcache->cached_weight + full_cargo_weight, this->virtual_train->GetDisplayMaxSpeed()));
DrawString(8, r.right, y, STR_VEHICLE_INFO_MAX_SPEED_LOADED);
}
/* Draw cargo summary */
CargoArray cargo_caps;
for (const Train *tmp = this->virtual_train; tmp != nullptr; tmp = tmp->Next()) {