(svn r12209) -Fix: [NewGRF] Support using any base price for rail and road vehicles' running cost, and show running cost of wagons if they have it.

This commit is contained in:
peter1138
2008-02-21 19:09:10 +00:00
parent c0544563a6
commit dda6cab17a
10 changed files with 199 additions and 152 deletions

View File

@@ -126,7 +126,7 @@ static void DrawTrainEngineInfo(EngineID engine, int x, int y, int maxw)
SetDParam(3, rvi->power << multihead);
SetDParam(1, rvi->weight << multihead);
SetDParam(4, rvi->running_cost * _price.running_rail[rvi->running_cost_class] >> 8 << multihead);
SetDParam(4, rvi->running_cost * GetPriceByIndex(rvi->running_cost_class) >> 8 << multihead);
if (rvi->capacity != 0) {
SetDParam(5, rvi->cargo_type);
@@ -155,7 +155,7 @@ static void DrawRoadVehEngineInfo(EngineID engine, int x, int y, int maxw)
SetDParam(0, (_price.roadveh_base >> 3) * rvi->base_cost >> 5);
SetDParam(1, rvi->max_speed * 10 / 32);
SetDParam(2, rvi->running_cost * _price.roadveh_running >> 8);
SetDParam(2, rvi->running_cost * GetPriceByIndex(rvi->running_cost_class) >> 8);
SetDParam(3, rvi->cargo_type);
SetDParam(4, rvi->capacity);