Fix #423: Max TE/weight should not be shown for maglevs
This commit is contained in:
@@ -352,8 +352,10 @@ public:
|
||||
SetDParam(0, full_weight);
|
||||
if (_settings_client.gui.show_train_weight_ratios_in_details) {
|
||||
SetDParam(1, STR_VEHICLE_INFO_WEIGHT_RATIOS);
|
||||
SetDParam(2, (100 * this->virtual_train->gcache.cached_power) / std::max<uint>(1, full_weight));
|
||||
SetDParam(3, (this->virtual_train->gcache.cached_max_te / 10) / std::max<uint>(1, full_weight));
|
||||
SetDParam(2, STR_VEHICLE_INFO_POWER_WEIGHT_RATIO);
|
||||
SetDParam(3, (100 * this->virtual_train->gcache.cached_power) / std::max<uint>(1, full_weight));
|
||||
SetDParam(4, this->virtual_train->GetAccelerationType() == 2 ? STR_EMPTY : STR_VEHICLE_INFO_TE_WEIGHT_RATIO);
|
||||
SetDParam(5, (this->virtual_train->gcache.cached_max_te / 10) / std::max<uint>(1, full_weight));
|
||||
} else {
|
||||
SetDParam(1, STR_EMPTY);
|
||||
}
|
||||
|
Reference in New Issue
Block a user