File diff r27049:913f3ce60451 → r27050:d85c65824c1e
src/engine_gui.cpp
Show inline comments
 
@@ -167,13 +167,13 @@ uint GetTotalCapacityOfArticulatedParts(
 
	return cap.GetSum<uint>();
 
}
 

	
 
static StringID GetTrainEngineInfoString(const Engine *e)
 
{
 
	SetDParam(0, e->GetCost());
 
	SetDParam(2, e->GetDisplayMaxSpeed());
 
	SetDParam(2, PackVelocity(e->GetDisplayMaxSpeed(), e->type));
 
	SetDParam(3, e->GetPower());
 
	SetDParam(1, e->GetDisplayWeight());
 
	SetDParam(7, e->GetDisplayMaxTractiveEffort());
 

	
 
	SetDParam(4, e->GetRunningCost());
 

	
 
@@ -193,13 +193,13 @@ static StringID GetAircraftEngineInfoStr
 
	uint16 mail_capacity;
 
	uint capacity = e->GetDisplayDefaultCapacity(&mail_capacity);
 
	uint16 range = e->GetRange();
 

	
 
	uint i = 0;
 
	SetDParam(i++, e->GetCost());
 
	SetDParam(i++, e->GetDisplayMaxSpeed());
 
	SetDParam(i++, PackVelocity(e->GetDisplayMaxSpeed(), e->type));
 
	SetDParam(i++, e->GetAircraftTypeText());
 
	if (range > 0) SetDParam(i++, range);
 
	SetDParam(i++, cargo);
 
	SetDParam(i++, capacity);
 

	
 
	if (mail_capacity > 0) {
 
@@ -214,25 +214,25 @@ static StringID GetAircraftEngineInfoStr
 
}
 

	
 
static StringID GetRoadVehEngineInfoString(const Engine *e)
 
{
 
	if (_settings_game.vehicle.roadveh_acceleration_model == AM_ORIGINAL) {
 
		SetDParam(0, e->GetCost());
 
		SetDParam(1, e->GetDisplayMaxSpeed());
 
		SetDParam(1, PackVelocity(e->GetDisplayMaxSpeed(), e->type));
 
		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_CAP_RUNCOST;
 
	} else {
 
		SetDParam(0, e->GetCost());
 
		SetDParam(2, e->GetDisplayMaxSpeed());
 
		SetDParam(2, PackVelocity(e->GetDisplayMaxSpeed(), e->type));
 
		SetDParam(3, e->GetPower());
 
		SetDParam(1, e->GetDisplayWeight());
 
		SetDParam(7, e->GetDisplayMaxTractiveEffort());
 

	
 
		SetDParam(4, e->GetRunningCost());
 

	
 
@@ -247,13 +247,13 @@ static StringID GetRoadVehEngineInfoStri
 
	}
 
}
 

	
 
static StringID GetShipEngineInfoString(const Engine *e)
 
{
 
	SetDParam(0, e->GetCost());
 
	SetDParam(1, e->GetDisplayMaxSpeed());
 
	SetDParam(1, PackVelocity(e->GetDisplayMaxSpeed(), e->type));
 
	SetDParam(2, e->GetDefaultCargoType());
 
	SetDParam(3, e->GetDisplayDefaultCapacity());
 
	SetDParam(4, e->GetRunningCost());
 
	return STR_ENGINE_PREVIEW_COST_MAX_SPEED_CAP_RUNCOST;
 
}