1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-30 09:59:10 +00:00

(svn r6376) -Codechange: [vehicle refit] moved all refit cost calculations into GetRefitCost()

Now it's possible to tell refit costs for an EngineID without actually having build a vehicle
This commit is contained in:
bjarni
2006-09-04 09:07:52 +00:00
parent df135e8190
commit 1a0476535d
6 changed files with 25 additions and 6 deletions

View File

@@ -1819,9 +1819,7 @@ int32 CmdRefitRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (amount != 0) {
if (new_cid != v->cargo_type) {
int32 base_cost = (rvi->flags & RVI_WAGON) ?
_price.build_railwagon : _price.build_railvehicle;
cost += (EngInfo(v->engine_type)->refit_cost * base_cost) >> 9;
cost += GetRefitCost(v->engine_type);
}
num += amount;