Mercurial > hg > openttd
changeset 15320:3497d082f8d4 draft
(svn r19961) -Codechange: Unify "vehicle is destroyed" errors.
author | terkhen <terkhen@openttd.org> |
---|---|
date | Fri, 11 Jun 2010 20:20:45 +0000 |
parents | 1d831c0b5eae |
children | e02e72016811 |
files | src/ai/api/ai_vehicle.hpp src/ai/api/ai_vehicle.hpp.sq src/aircraft_cmd.cpp src/lang/english.txt src/roadveh_cmd.cpp src/ship_cmd.cpp src/train_cmd.cpp |
diffstat | 7 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ai/api/ai_vehicle.hpp +++ b/src/ai/api/ai_vehicle.hpp @@ -56,7 +56,7 @@ ERR_VEHICLE_CANNOT_REFIT, // [STR_ERROR_CAN_T_REFIT_TRAIN, STR_ERROR_CAN_T_REFIT_ROAD_VEHICLE, STR_ERROR_CAN_T_REFIT_SHIP, STR_ERROR_CAN_T_REFIT_AIRCRAFT] /** Vehicle is destroyed */ - ERR_VEHICLE_IS_DESTROYED, // [STR_ERROR_CAN_T_REFIT_DESTROYED_VEHICLE, STR_ERROR_CAN_T_SELL_DESTROYED_VEHICLE] + ERR_VEHICLE_IS_DESTROYED, // [STR_ERROR_VEHICLE_IS_DESTROYED] /** Vehicle is not in a depot */ ERR_VEHICLE_NOT_IN_DEPOT, // [STR_ERROR_AIRCRAFT_MUST_BE_STOPPED, STR_ERROR_ROAD_VEHICLE_MUST_BE_STOPPED_INSIDE_DEPOT, STR_TRAIN_MUST_BE_STOPPED, STR_ERROR_SHIP_MUST_BE_STOPPED_IN_DEPOT]
--- a/src/ai/api/ai_vehicle.hpp.sq +++ b/src/ai/api/ai_vehicle.hpp.sq @@ -88,8 +88,7 @@ AIError::RegisterErrorMap(STR_ERROR_CAN_T_REFIT_ROAD_VEHICLE, AIVehicle::ERR_VEHICLE_CANNOT_REFIT); AIError::RegisterErrorMap(STR_ERROR_CAN_T_REFIT_SHIP, AIVehicle::ERR_VEHICLE_CANNOT_REFIT); AIError::RegisterErrorMap(STR_ERROR_CAN_T_REFIT_AIRCRAFT, AIVehicle::ERR_VEHICLE_CANNOT_REFIT); - AIError::RegisterErrorMap(STR_ERROR_CAN_T_REFIT_DESTROYED_VEHICLE, AIVehicle::ERR_VEHICLE_IS_DESTROYED); - AIError::RegisterErrorMap(STR_ERROR_CAN_T_SELL_DESTROYED_VEHICLE, AIVehicle::ERR_VEHICLE_IS_DESTROYED); + AIError::RegisterErrorMap(STR_ERROR_VEHICLE_IS_DESTROYED, AIVehicle::ERR_VEHICLE_IS_DESTROYED); AIError::RegisterErrorMap(STR_ERROR_AIRCRAFT_MUST_BE_STOPPED, AIVehicle::ERR_VEHICLE_NOT_IN_DEPOT); AIError::RegisterErrorMap(STR_ERROR_ROAD_VEHICLE_MUST_BE_STOPPED_INSIDE_DEPOT, AIVehicle::ERR_VEHICLE_NOT_IN_DEPOT); AIError::RegisterErrorMap(STR_TRAIN_MUST_BE_STOPPED, AIVehicle::ERR_VEHICLE_NOT_IN_DEPOT);
--- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -400,7 +400,7 @@ 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 @@ 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);
--- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -3642,6 +3642,7 @@ STR_ERROR_CAN_T_SELL_DESTROYED_VEHICLE :{WHITE}Can't sell destroyed vehicle... STR_ERROR_CAN_T_REFIT_DESTROYED_VEHICLE :{WHITE}Can't refit destroyed vehicle... +STR_ERROR_VEHICLE_IS_DESTROYED :{WHITE}... vehicle is destroyed # Specific vehicle errors STR_ERROR_CAN_T_MAKE_TRAIN_PASS_SIGNAL :{WHITE}Can't make train pass signal at danger...
--- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -338,7 +338,7 @@ CommandCost ret = CheckOwnership(v->owner); if (ret.Failed()) return ret; - 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); if (!v->IsStoppedInDepot()) { return_cmd_error(STR_ERROR_ROAD_VEHICLE_MUST_BE_STOPPED_INSIDE_DEPOT); @@ -1769,7 +1769,7 @@ if (ret.Failed()) return ret; if (!v->IsStoppedInDepot()) return_cmd_error(STR_ERROR_ROAD_VEHICLE_MUST_BE_STOPPED_INSIDE_DEPOT); - 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); if (new_cid >= NUM_CARGO) return CMD_ERROR;
--- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -715,7 +715,7 @@ CommandCost ret = CheckOwnership(v->owner); if (ret.Failed()) return ret; - 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); if (!v->IsStoppedInDepot()) { return_cmd_error(STR_ERROR_SHIP_MUST_BE_STOPPED_IN_DEPOT); @@ -790,7 +790,7 @@ if (ret.Failed()) return ret; if (!v->IsStoppedInDepot()) return_cmd_error(STR_ERROR_SHIP_MUST_BE_STOPPED_IN_DEPOT); - 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;
--- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -1358,7 +1358,7 @@ /* 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 @@ 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;