From acc3c75951c4db0873db794b657697774f0ff9e9 Mon Sep 17 00:00:00 2001 From: frosch Date: Tue, 1 Nov 2011 00:23:41 +0000 Subject: (svn r23075) -Codechange: Add GetGRF() and GetGRFID() methods to Engine and Vehicle to simplify code. --- src/vehicle_cmd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vehicle_cmd.cpp') diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp index 48d8e42bb..b9d7fe4d4 100644 --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -241,7 +241,7 @@ static CommandCost GetRefitCost(EngineID engine_type) default: NOT_REACHED(); } - return CommandCost(expense_type, GetPrice(base_price, cost_factor, e->grf_prop.grffile, -10)); + return CommandCost(expense_type, GetPrice(base_price, cost_factor, e->GetGRF(), -10)); } /** @@ -448,7 +448,7 @@ CommandCost CmdStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, * return 0xFF if it can. */ uint16 callback = GetVehicleCallback(CBID_VEHICLE_START_STOP_CHECK, 0, 0, v->engine_type, v); if (callback != CALLBACK_FAILED && GB(callback, 0, 8) != 0xFF && HasBit(p2, 0)) { - StringID error = GetGRFStringID(GetEngineGRFID(v->engine_type), 0xD000 + callback); + StringID error = GetGRFStringID(v->GetGRFID(), 0xD000 + callback); return_cmd_error(error); } -- cgit v1.2.3-54-g00ecf