(svn r17926) -Fix (r9352): Make the decision whether aircraft carry mail consistent. Now always the cargo class decides.
This commit is contained in:
@@ -158,21 +158,23 @@ static StringID GetTrainEngineInfoString(const Engine *e)
|
||||
static StringID GetAircraftEngineInfoString(const Engine *e)
|
||||
{
|
||||
CargoID cargo = e->GetDefaultCargoType();
|
||||
uint16 mail_capacity;
|
||||
uint capacity = e->GetDisplayDefaultCapacity(&mail_capacity);
|
||||
|
||||
if (cargo == CT_INVALID || cargo == CT_PASSENGERS) {
|
||||
if (mail_capacity > 0) {
|
||||
SetDParam(0, e->GetCost());
|
||||
SetDParam(1, e->GetDisplayMaxSpeed());
|
||||
SetDParam(2, CT_PASSENGERS),
|
||||
SetDParam(3, e->GetDisplayDefaultCapacity());
|
||||
SetDParam(4, CT_MAIL),
|
||||
SetDParam(5, e->u.air.mail_capacity);
|
||||
SetDParam(2, cargo);
|
||||
SetDParam(3, capacity);
|
||||
SetDParam(4, CT_MAIL);
|
||||
SetDParam(5, mail_capacity);
|
||||
SetDParam(6, e->GetRunningCost());
|
||||
return STR_ENGINE_PREVIEW_COST_MAX_SPEED_CAPACITY_CAPACITY_RUNCOST;
|
||||
} else {
|
||||
SetDParam(0, e->GetCost());
|
||||
SetDParam(1, e->GetDisplayMaxSpeed());
|
||||
SetDParam(2, cargo);
|
||||
SetDParam(3, e->GetDisplayDefaultCapacity());
|
||||
SetDParam(3, capacity);
|
||||
SetDParam(4, e->GetRunningCost());
|
||||
return STR_ENGINE_PREVIEW_COST_MAX_SPEED_CAPACITY_RUNCOST;
|
||||
}
|
||||
|
Reference in New Issue
Block a user