|
|
|
@ -1358,7 +1358,7 @@ CommandCost CmdSellRailWagon(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
|
|
|
|
|
/* Sell a chain of vehicles or not? */
|
|
|
|
|
bool sell_chain = HasBit(p2, 0);
|
|
|
|
|
|
|
|
|
|
if (v->vehstatus & VS_CRASHED) return_cmd_error(STR_ERROR_CAN_T_SELL_DESTROYED_VEHICLE);
|
|
|
|
|
if (v->vehstatus & VS_CRASHED) return_cmd_error(STR_ERROR_VEHICLE_IS_DESTROYED);
|
|
|
|
|
|
|
|
|
|
v = v->GetFirstEnginePart();
|
|
|
|
|
Train *first = v->First();
|
|
|
|
@ -1939,7 +1939,7 @@ CommandCost CmdRefitRailVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1,
|
|
|
|
|
if (ret.Failed()) return ret;
|
|
|
|
|
|
|
|
|
|
if (!v->IsStoppedInDepot()) return_cmd_error(STR_TRAIN_MUST_BE_STOPPED);
|
|
|
|
|
if (v->vehstatus & VS_CRASHED) return_cmd_error(STR_ERROR_CAN_T_REFIT_DESTROYED_VEHICLE);
|
|
|
|
|
if (v->vehstatus & VS_CRASHED) return_cmd_error(STR_ERROR_VEHICLE_IS_DESTROYED);
|
|
|
|
|
|
|
|
|
|
/* Check cargo */
|
|
|
|
|
if (new_cid >= NUM_CARGO) return CMD_ERROR;
|
|
|
|
|