src/build_vehicle_gui.cpp
changeset 9354 845e07db4549
parent 9318 e11852858eb9
child 9380 62dabf4a5b7e
equal deleted inserted replaced
9353:9d76aef9fe2b 9354:845e07db4549
   504 	SetDParam(1, (GetCargo(rvi->cargo_type)->weight * GetEngineProperty(engine_number, 0x14, rvi->capacity) >> 4) + weight);
   504 	SetDParam(1, (GetCargo(rvi->cargo_type)->weight * GetEngineProperty(engine_number, 0x14, rvi->capacity) >> 4) + weight);
   505 	DrawString(x, y, STR_PURCHASE_INFO_WEIGHT_CWEIGHT, TC_FROMSTRING);
   505 	DrawString(x, y, STR_PURCHASE_INFO_WEIGHT_CWEIGHT, TC_FROMSTRING);
   506 	y += 10;
   506 	y += 10;
   507 
   507 
   508 	/* Wagon speed limit, displayed if above zero */
   508 	/* Wagon speed limit, displayed if above zero */
   509 	if (_patches.wagon_speed_limits) {
   509 	if (_settings.vehicle.wagon_speed_limits) {
   510 		uint max_speed = GetEngineProperty(engine_number, 0x09, rvi->max_speed);
   510 		uint max_speed = GetEngineProperty(engine_number, 0x09, rvi->max_speed);
   511 		if (max_speed > 0) {
   511 		if (max_speed > 0) {
   512 			SetDParam(0, max_speed * 10 / 16);
   512 			SetDParam(0, max_speed * 10 / 16);
   513 			DrawString(x, y, STR_PURCHASE_INFO_SPEED, TC_FROMSTRING);
   513 			DrawString(x, y, STR_PURCHASE_INFO_SPEED, TC_FROMSTRING);
   514 			y += 10;
   514 			y += 10;
   542 	SetDParam(1, GetEngineProperty(engine_number, 0x0B, rvi->power));
   542 	SetDParam(1, GetEngineProperty(engine_number, 0x0B, rvi->power));
   543 	DrawString(x, y, STR_PURCHASE_INFO_SPEED_POWER, TC_FROMSTRING);
   543 	DrawString(x, y, STR_PURCHASE_INFO_SPEED_POWER, TC_FROMSTRING);
   544 	y += 10;
   544 	y += 10;
   545 
   545 
   546 	/* Max tractive effort - not applicable if old acceleration or maglev */
   546 	/* Max tractive effort - not applicable if old acceleration or maglev */
   547 	if (_patches.realistic_acceleration && rvi->railtype != RAILTYPE_MAGLEV) {
   547 	if (_settings.vehicle.realistic_acceleration && rvi->railtype != RAILTYPE_MAGLEV) {
   548 		SetDParam(0, ((weight << multihead) * 10 * GetEngineProperty(engine_number, 0x1F, rvi->tractive_effort)) / 256);
   548 		SetDParam(0, ((weight << multihead) * 10 * GetEngineProperty(engine_number, 0x1F, rvi->tractive_effort)) / 256);
   549 		DrawString(x, y, STR_PURCHASE_INFO_MAX_TE, TC_FROMSTRING);
   549 		DrawString(x, y, STR_PURCHASE_INFO_MAX_TE, TC_FROMSTRING);
   550 		y += 10;
   550 		y += 10;
   551 	}
   551 	}
   552 
   552