(svn r19961) -Codechange: Unify "vehicle is destroyed" errors.

This commit is contained in:
terkhen
2010-06-11 20:20:45 +00:00
parent a3cd86ac80
commit 54403a8251
7 changed files with 11 additions and 11 deletions

View File

@@ -400,7 +400,7 @@ CommandCost CmdSellAircraft(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
if (!v->IsStoppedInDepot()) return_cmd_error(STR_ERROR_AIRCRAFT_MUST_BE_STOPPED);
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);
ret = CommandCost(EXPENSES_NEW_VEHICLES, -v->value);
@@ -477,7 +477,7 @@ CommandCost CmdRefitAircraft(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
if (ret.Failed()) return ret;
if (!v->IsStoppedInDepot()) return_cmd_error(STR_ERROR_AIRCRAFT_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 */
CargoID new_cid = GB(p2, 0, 8);