summaryrefslogtreecommitdiff
path: root/src/ai/api
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-07-08 22:11:55 +0000
committerrubidium <rubidium@openttd.org>2009-07-08 22:11:55 +0000
commit741a340b8b0fba9b3be951f99ce4f57ba2a21621 (patch)
tree9ce21cde69d3a284f36935c0f850a93a46aa8241 /src/ai/api
parent16e207f78b98b237aa98bca033b550cb8954fb61 (diff)
downloadopenttd-741a340b8b0fba9b3be951f99ce4f57ba2a21621.tar.xz
(svn r16772) -Fix [FS#3019]: don't use the same error message for turning around road vehicles and flipping parts of trains in the depot
Diffstat (limited to 'src/ai/api')
-rw-r--r--src/ai/api/ai_vehicle.hpp2
-rw-r--r--src/ai/api/ai_vehicle.hpp.sq66
2 files changed, 35 insertions, 33 deletions
diff --git a/src/ai/api/ai_vehicle.hpp b/src/ai/api/ai_vehicle.hpp
index f726a8331..a93cb8026 100644
--- a/src/ai/api/ai_vehicle.hpp
+++ b/src/ai/api/ai_vehicle.hpp
@@ -43,7 +43,7 @@ public:
ERR_VEHICLE_CANNOT_START_STOP, // [STR_ERROR_CAN_T_STOP_START_TRAIN, STR_ERROR_CAN_T_STOP_START_ROAD_VEHICLE, STR_ERROR_CAN_T_STOP_START_SHIP, STR_ERROR_CAN_T_STOP_START_AIRCRAFT]
/** Vehicle can't turn */
- ERR_VEHICLE_CANNOT_TURN, // [STR_ERROR_CAN_T_REVERSE_DIRECTION, STR_ERROR_CAN_T_MAKE_VEHICLE_TURN]
+ ERR_VEHICLE_CANNOT_TURN, // [STR_ERROR_CAN_T_MAKE_ROAD_VEHICLE_TURN, STR_ERROR_CAN_T_REVERSE_DIRECTION_TRAIN, STR_ERROR_CAN_T_REVERSE_DIRECTION_RAIL_VEHICLE, STR_ERROR_CAN_T_REVERSE_DIRECTION_RAIL_VEHICLE_MULTIPLE_UNITS]
/** Vehicle can't be refit */
ERR_VEHICLE_CANNOT_REFIT, // [STR_RAIL_CAN_T_REFIT_VEHICLE, STR_REFIT_ROAD_VEHICLE_CAN_T, STR_ERROR_CAN_T_REFIT_SHIP, STR_ERROR_CAN_T_REFIT_AIRCRAFT]
diff --git a/src/ai/api/ai_vehicle.hpp.sq b/src/ai/api/ai_vehicle.hpp.sq
index 49ea21716..3f01d25d8 100644
--- a/src/ai/api/ai_vehicle.hpp.sq
+++ b/src/ai/api/ai_vehicle.hpp.sq
@@ -52,38 +52,40 @@ void SQAIVehicle_Register(Squirrel *engine) {
SQAIVehicle.DefSQConst(engine, AIVehicle::VS_CRASHED, "VS_CRASHED");
SQAIVehicle.DefSQConst(engine, AIVehicle::VS_INVALID, "VS_INVALID");
- AIError::RegisterErrorMap(STR_ERROR_TOO_MANY_VEHICLES_IN_GAME, AIVehicle::ERR_VEHICLE_TOO_MANY);
- AIError::RegisterErrorMap(STR_AIRCRAFT_NOT_AVAILABLE, AIVehicle::ERR_VEHICLE_NOT_AVAILABLE);
- AIError::RegisterErrorMap(STR_ROAD_VEHICLE_NOT_AVAILABLE, AIVehicle::ERR_VEHICLE_NOT_AVAILABLE);
- AIError::RegisterErrorMap(STR_SHIP_NOT_AVAILABLE, AIVehicle::ERR_VEHICLE_NOT_AVAILABLE);
- AIError::RegisterErrorMap(STR_RAIL_VEHICLE_NOT_AVAILABLE, AIVehicle::ERR_VEHICLE_NOT_AVAILABLE);
- AIError::RegisterErrorMap(STR_ERROR_CAN_T_BUILD_AIRCRAFT, AIVehicle::ERR_VEHICLE_BUILD_DISABLED);
- AIError::RegisterErrorMap(STR_ERROR_CAN_T_BUILD_SHIP, AIVehicle::ERR_VEHICLE_BUILD_DISABLED);
- AIError::RegisterErrorMap(STR_ERROR_CAN_T_BUILD_ROAD_VEHICLE, AIVehicle::ERR_VEHICLE_BUILD_DISABLED);
- AIError::RegisterErrorMap(STR_ERROR_CAN_T_BUILD_RAILROAD_VEHICLE, AIVehicle::ERR_VEHICLE_BUILD_DISABLED);
- AIError::RegisterErrorMap(STR_DEPOT_WRONG_DEPOT_TYPE, AIVehicle::ERR_VEHICLE_WRONG_DEPOT);
- AIError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_TRAIN_TO_DEPOT, AIVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT);
- AIError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_VEHICLE_TO_DEPOT, AIVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT);
- AIError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_SHIP_TO_DEPOT, AIVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT);
- AIError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_AIRCRAFT_TO_HANGAR, AIVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT);
- AIError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_TRAIN, AIVehicle::ERR_VEHICLE_CANNOT_START_STOP);
- AIError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_ROAD_VEHICLE, AIVehicle::ERR_VEHICLE_CANNOT_START_STOP);
- AIError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_SHIP, AIVehicle::ERR_VEHICLE_CANNOT_START_STOP);
- AIError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_AIRCRAFT, AIVehicle::ERR_VEHICLE_CANNOT_START_STOP);
- AIError::RegisterErrorMap(STR_ERROR_CAN_T_REVERSE_DIRECTION, AIVehicle::ERR_VEHICLE_CANNOT_TURN);
- AIError::RegisterErrorMap(STR_ERROR_CAN_T_MAKE_VEHICLE_TURN, AIVehicle::ERR_VEHICLE_CANNOT_TURN);
- AIError::RegisterErrorMap(STR_RAIL_CAN_T_REFIT_VEHICLE, AIVehicle::ERR_VEHICLE_CANNOT_REFIT);
- AIError::RegisterErrorMap(STR_REFIT_ROAD_VEHICLE_CAN_T, 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_CAN_T_REFIT_DESTROYED_VEHICLE, AIVehicle::ERR_VEHICLE_IS_DESTROYED);
- AIError::RegisterErrorMap(STR_CAN_T_SELL_DESTROYED_VEHICLE, AIVehicle::ERR_VEHICLE_IS_DESTROYED);
- AIError::RegisterErrorMap(STR_ERROR_AIRCRAFT_MUST_BE_STOPPED, AIVehicle::ERR_VEHICLE_NOT_IN_DEPOT);
- AIError::RegisterErrorMap(STR_ERROR_ROAD_MUST_BE_STOPPED_INSIDE_DEPOT, AIVehicle::ERR_VEHICLE_NOT_IN_DEPOT);
- AIError::RegisterErrorMap(STR_TRAIN_MUST_BE_STOPPED, AIVehicle::ERR_VEHICLE_NOT_IN_DEPOT);
- AIError::RegisterErrorMap(STR_ERROR_SHIP_MUST_BE_STOPPED_IN_DEPOT, AIVehicle::ERR_VEHICLE_NOT_IN_DEPOT);
- AIError::RegisterErrorMap(STR_ERROR_AIRCRAFT_IS_IN_FLIGHT, AIVehicle::ERR_VEHICLE_IN_FLIGHT);
- AIError::RegisterErrorMap(STR_TRAIN_START_NO_CATENARY, AIVehicle::ERR_VEHCILE_NO_POWER);
+ AIError::RegisterErrorMap(STR_ERROR_TOO_MANY_VEHICLES_IN_GAME, AIVehicle::ERR_VEHICLE_TOO_MANY);
+ AIError::RegisterErrorMap(STR_AIRCRAFT_NOT_AVAILABLE, AIVehicle::ERR_VEHICLE_NOT_AVAILABLE);
+ AIError::RegisterErrorMap(STR_ROAD_VEHICLE_NOT_AVAILABLE, AIVehicle::ERR_VEHICLE_NOT_AVAILABLE);
+ AIError::RegisterErrorMap(STR_SHIP_NOT_AVAILABLE, AIVehicle::ERR_VEHICLE_NOT_AVAILABLE);
+ AIError::RegisterErrorMap(STR_RAIL_VEHICLE_NOT_AVAILABLE, AIVehicle::ERR_VEHICLE_NOT_AVAILABLE);
+ AIError::RegisterErrorMap(STR_ERROR_CAN_T_BUILD_AIRCRAFT, AIVehicle::ERR_VEHICLE_BUILD_DISABLED);
+ AIError::RegisterErrorMap(STR_ERROR_CAN_T_BUILD_SHIP, AIVehicle::ERR_VEHICLE_BUILD_DISABLED);
+ AIError::RegisterErrorMap(STR_ERROR_CAN_T_BUILD_ROAD_VEHICLE, AIVehicle::ERR_VEHICLE_BUILD_DISABLED);
+ AIError::RegisterErrorMap(STR_ERROR_CAN_T_BUILD_RAILROAD_VEHICLE, AIVehicle::ERR_VEHICLE_BUILD_DISABLED);
+ AIError::RegisterErrorMap(STR_DEPOT_WRONG_DEPOT_TYPE, AIVehicle::ERR_VEHICLE_WRONG_DEPOT);
+ AIError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_TRAIN_TO_DEPOT, AIVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT);
+ AIError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_VEHICLE_TO_DEPOT, AIVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT);
+ AIError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_SHIP_TO_DEPOT, AIVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT);
+ AIError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_AIRCRAFT_TO_HANGAR, AIVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT);
+ AIError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_TRAIN, AIVehicle::ERR_VEHICLE_CANNOT_START_STOP);
+ AIError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_ROAD_VEHICLE, AIVehicle::ERR_VEHICLE_CANNOT_START_STOP);
+ AIError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_SHIP, AIVehicle::ERR_VEHICLE_CANNOT_START_STOP);
+ AIError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_AIRCRAFT, AIVehicle::ERR_VEHICLE_CANNOT_START_STOP);
+ AIError::RegisterErrorMap(STR_ERROR_CAN_T_MAKE_ROAD_VEHICLE_TURN, AIVehicle::ERR_VEHICLE_CANNOT_TURN);
+ AIError::RegisterErrorMap(STR_ERROR_CAN_T_REVERSE_DIRECTION_TRAIN, AIVehicle::ERR_VEHICLE_CANNOT_TURN);
+ AIError::RegisterErrorMap(STR_ERROR_CAN_T_REVERSE_DIRECTION_RAIL_VEHICLE, AIVehicle::ERR_VEHICLE_CANNOT_TURN);
+ AIError::RegisterErrorMap(STR_ERROR_CAN_T_REVERSE_DIRECTION_RAIL_VEHICLE_MULTIPLE_UNITS, AIVehicle::ERR_VEHICLE_CANNOT_TURN);
+ AIError::RegisterErrorMap(STR_RAIL_CAN_T_REFIT_VEHICLE, AIVehicle::ERR_VEHICLE_CANNOT_REFIT);
+ AIError::RegisterErrorMap(STR_REFIT_ROAD_VEHICLE_CAN_T, 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_CAN_T_REFIT_DESTROYED_VEHICLE, AIVehicle::ERR_VEHICLE_IS_DESTROYED);
+ AIError::RegisterErrorMap(STR_CAN_T_SELL_DESTROYED_VEHICLE, AIVehicle::ERR_VEHICLE_IS_DESTROYED);
+ AIError::RegisterErrorMap(STR_ERROR_AIRCRAFT_MUST_BE_STOPPED, AIVehicle::ERR_VEHICLE_NOT_IN_DEPOT);
+ AIError::RegisterErrorMap(STR_ERROR_ROAD_MUST_BE_STOPPED_INSIDE_DEPOT, AIVehicle::ERR_VEHICLE_NOT_IN_DEPOT);
+ AIError::RegisterErrorMap(STR_TRAIN_MUST_BE_STOPPED, AIVehicle::ERR_VEHICLE_NOT_IN_DEPOT);
+ AIError::RegisterErrorMap(STR_ERROR_SHIP_MUST_BE_STOPPED_IN_DEPOT, AIVehicle::ERR_VEHICLE_NOT_IN_DEPOT);
+ AIError::RegisterErrorMap(STR_ERROR_AIRCRAFT_IS_IN_FLIGHT, AIVehicle::ERR_VEHICLE_IN_FLIGHT);
+ AIError::RegisterErrorMap(STR_TRAIN_START_NO_CATENARY, AIVehicle::ERR_VEHCILE_NO_POWER);
AIError::RegisterErrorMapString(AIVehicle::ERR_VEHICLE_TOO_MANY, "ERR_VEHICLE_TOO_MANY");
AIError::RegisterErrorMapString(AIVehicle::ERR_VEHICLE_NOT_AVAILABLE, "ERR_VEHICLE_NOT_AVAILABLE");