summaryrefslogtreecommitdiff
path: root/src/engine_gui.cpp
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2010-03-06 12:59:28 +0000
committerterkhen <terkhen@openttd.org>2010-03-06 12:59:28 +0000
commitbe3b839ded1372ad6a3802118bb70fead2ccd4ce (patch)
treea3cd77841a20bf21b1dbcd7768b66467647a8046 /src/engine_gui.cpp
parentb443a3ee0a39f28be1fde279e67c82ee51814f4d (diff)
downloadopenttd-be3b839ded1372ad6a3802118bb70fead2ccd4ce.tar.xz
(svn r19347) -Add: Vehicle GUI now shows power, weight and tractive effort for road vehicles.
Diffstat (limited to 'src/engine_gui.cpp')
-rw-r--r--src/engine_gui.cpp37
1 files changed, 28 insertions, 9 deletions
diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp
index d8dc95695..7247450d6 100644
--- a/src/engine_gui.cpp
+++ b/src/engine_gui.cpp
@@ -188,17 +188,36 @@ static StringID GetAircraftEngineInfoString(const Engine *e)
static StringID GetRoadVehEngineInfoString(const Engine *e)
{
- SetDParam(0, e->GetCost());
- SetDParam(1, e->GetDisplayMaxSpeed());
- uint capacity = GetTotalCapacityOfArticulatedParts(e->index);
- if (capacity != 0) {
- SetDParam(2, e->GetDefaultCargoType());
- SetDParam(3, capacity);
+ if (_settings_game.vehicle.roadveh_acceleration_model == AM_ORIGINAL) {
+ SetDParam(0, e->GetCost());
+ SetDParam(1, e->GetDisplayMaxSpeed());
+ uint capacity = GetTotalCapacityOfArticulatedParts(e->index);
+ if (capacity != 0) {
+ SetDParam(2, e->GetDefaultCargoType());
+ SetDParam(3, capacity);
+ } else {
+ SetDParam(2, CT_INVALID);
+ }
+ SetDParam(4, e->GetRunningCost());
+ return STR_ENGINE_PREVIEW_COST_MAX_SPEED_CAPACITY_RUNCOST;
} else {
- SetDParam(2, CT_INVALID);
+ SetDParam(0, e->GetCost());
+ SetDParam(2, e->GetDisplayMaxSpeed());
+ SetDParam(3, e->GetPower());
+ SetDParam(1, e->GetDisplayWeight());
+ SetDParam(7, e->GetDisplayMaxTractiveEffort());
+
+ SetDParam(4, e->GetRunningCost());
+
+ uint capacity = GetTotalCapacityOfArticulatedParts(e->index);
+ if (capacity != 0) {
+ SetDParam(5, e->GetDefaultCargoType());
+ SetDParam(6, capacity);
+ } else {
+ SetDParam(5, CT_INVALID);
+ }
+ return STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER_MAX_TE;
}
- SetDParam(4, e->GetRunningCost());
- return STR_ENGINE_PREVIEW_COST_MAX_SPEED_CAPACITY_RUNCOST;
}
static StringID GetShipEngineInfoString(const Engine *e)