diff options
author | frosch <frosch@openttd.org> | 2011-11-01 00:23:41 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-11-01 00:23:41 +0000 |
commit | acc3c75951c4db0873db794b657697774f0ff9e9 (patch) | |
tree | 2b7e5f953286b09c3c07688c9e8c49ee953c5adb /src/vehicle_cmd.cpp | |
parent | 72cd855978bf45fd444eae72551a12e13a35b0c8 (diff) | |
download | openttd-acc3c75951c4db0873db794b657697774f0ff9e9.tar.xz |
(svn r23075) -Codechange: Add GetGRF() and GetGRFID() methods to Engine and Vehicle to simplify code.
Diffstat (limited to 'src/vehicle_cmd.cpp')
-rw-r--r-- | src/vehicle_cmd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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); } |