(svn r3248) - Codechange: Change interface of CanRefitTo() to supply the engine type directly instead of getting it from a vehicle. This allows the function to be used before vehicles are involved.

This commit is contained in:
peter1138
2005-11-29 22:29:59 +00:00
parent 627dd10451
commit 0b48a69e02
5 changed files with 8 additions and 8 deletions

View File

@@ -1056,7 +1056,7 @@ int32 CmdRefitShip(int x, int y, uint32 flags, uint32 p1, uint32 p2)
/* Check cargo */
if (!ShipVehInfo(v->engine_type)->refittable) return CMD_ERROR;
if (new_cid > NUM_CARGO || !CanRefitTo(v, new_cid)) return CMD_ERROR;
if (new_cid > NUM_CARGO || !CanRefitTo(v->engine_type, new_cid)) return CMD_ERROR;
SET_EXPENSES_TYPE(EXPENSES_SHIP_RUN);