(svn r6855) - Codechange: When displaying a "quantity of cargo" string, use the {CARGO} command and supply the cargo type and quantity, instead of manually looking up the cargo type's string.

This commit is contained in:
peter1138
2006-10-20 11:53:29 +00:00
parent 4b674976d5
commit 68dda86c5b
10 changed files with 35 additions and 36 deletions

View File

@@ -231,7 +231,7 @@ void DrawAircraftPurchaseInfo(int x, int y, EngineID engine_number)
} else {
/* Note, if the default capacity is selected by the refit capacity
* callback, then the capacity shown is likely to be incorrect. */
SetDParam(0, _cargoc.names_long[cargo]);
SetDParam(0, cargo);
SetDParam(1, AircraftDefaultCargoCapacity(cargo, engine_number));
SetDParam(2, STR_9842_REFITTABLE);
DrawString(x, y, STR_PURCHASE_INFO_CAPACITY, 0);