Changeset - r18025:67e02ed243b4
[Not reviewed]
master
0 2 0
frosch - 13 years ago 2011-08-27 10:34:31
frosch@openttd.org
(svn r22850) -Feature: Display separate ocean and canal speeds in the ship purchase list, if they differ.
2 files changed with 22 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/build_vehicle_gui.cpp
Show inline comments
 
@@ -666,10 +666,27 @@ static int DrawShipPurchaseInfo(int left
 
	const Engine *e = Engine::Get(engine_number);
 

	
 
	/* Purchase cost - Max speed */
 
	uint raw_speed = e->GetDisplayMaxSpeed();
 
	uint ocean_speed = e->u.ship.ApplyWaterClassSpeedFrac(raw_speed, true);
 
	uint canal_speed = e->u.ship.ApplyWaterClassSpeedFrac(raw_speed, false);
 

	
 
	SetDParam(0, e->GetCost());
 
	SetDParam(1, e->GetDisplayMaxSpeed());
 
	DrawString(left, right, y, STR_PURCHASE_INFO_COST_SPEED);
 
	y += FONT_HEIGHT_NORMAL;
 
	if (ocean_speed == canal_speed) {
 
		SetDParam(1, ocean_speed);
 
		DrawString(left, right, y, STR_PURCHASE_INFO_COST_SPEED);
 
		y += FONT_HEIGHT_NORMAL;
 
	} else {
 
		DrawString(left, right, y, STR_PURCHASE_INFO_COST);
 
		y += FONT_HEIGHT_NORMAL;
 

	
 
		SetDParam(0, ocean_speed);
 
		DrawString(left, right, y, STR_PURCHASE_INFO_SPEED_OCEAN);
 
		y += FONT_HEIGHT_NORMAL;
 

	
 
		SetDParam(0, canal_speed);
 
		DrawString(left, right, y, STR_PURCHASE_INFO_SPEED_CANAL);
 
		y += FONT_HEIGHT_NORMAL;
 
	}
 

	
 
	/* Cargo type + capacity */
 
	SetDParam(0, e->GetDefaultCargoType());
src/lang/english.txt
Show inline comments
 
@@ -2836,6 +2836,8 @@ STR_BUY_VEHICLE_AIRCRAFT_CAPTION        
 
STR_PURCHASE_INFO_COST_WEIGHT                                   :{BLACK}Cost: {GOLD}{CURRENCY}{BLACK} Weight: {GOLD}{WEIGHT_S}
 
STR_PURCHASE_INFO_SPEED_POWER                                   :{BLACK}Speed: {GOLD}{VELOCITY}{BLACK} Power: {GOLD}{POWER}
 
STR_PURCHASE_INFO_SPEED                                         :{BLACK}Speed: {GOLD}{VELOCITY}
 
STR_PURCHASE_INFO_SPEED_OCEAN                                   :{BLACK}Speed on ocean: {GOLD}{VELOCITY}
 
STR_PURCHASE_INFO_SPEED_CANAL                                   :{BLACK}Speed on canal/river: {GOLD}{VELOCITY}
 
STR_PURCHASE_INFO_RUNNINGCOST                                   :{BLACK}Running Cost: {GOLD}{CURRENCY}/yr
 
STR_PURCHASE_INFO_CAPACITY                                      :{BLACK}Capacity: {GOLD}{CARGO} {STRING}
 
STR_PURCHASE_INFO_REFITTABLE                                    :(refittable)
0 comments (0 inline, 0 general)