(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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user