From 98103121d4f2ed1f1581919b7b1f343ccd410c12 Mon Sep 17 00:00:00 2001 From: truebrain Date: Tue, 29 Nov 2011 23:15:35 +0000 Subject: (svn r23355) -Codechange: rename all AI* to Script* (Rubidium) --- src/script/api/script_engine.hpp | 48 ++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'src/script/api/script_engine.hpp') diff --git a/src/script/api/script_engine.hpp b/src/script/api/script_engine.hpp index 26788d3d5..b7bd9f700 100644 --- a/src/script/api/script_engine.hpp +++ b/src/script/api/script_engine.hpp @@ -19,7 +19,7 @@ /** * Class that handles all engine related functions. */ -class AIEngine : public AIObject { +class ScriptEngine : public ScriptObject { public: /** * Checks whether the given engine type is valid. An engine is valid if you @@ -61,7 +61,7 @@ public: * @param engine_id The engine to check for refitting. * @param cargo_id The cargo to check for refitting. * @pre IsValidEngine(engine_id). - * @pre AICargo::IsValidCargo(cargo_id). + * @pre ScriptCargo::IsValidCargo(cargo_id). * @return True if the engine can carry this cargo, either via refit, or * by default. */ @@ -72,8 +72,8 @@ public: * @param engine_id The engine to check. * @param cargo_id The cargo to check. * @pre IsValidEngine(engine_id). - * @pre GetVehicleType(engine_id) == AIVehicle::VT_RAIL. - * @pre AICargo::IsValidCargo(cargo_id). + * @pre GetVehicleType(engine_id) == ScriptVehicle::VT_RAIL. + * @pre ScriptCargo::IsValidCargo(cargo_id). * @return True if the engine can pull wagons carrying this cargo. * @note This function is not exhaustive; a true here does not mean * that the vehicle can pull the wagons, a false does mean it can't. @@ -95,7 +95,7 @@ public: * reliability (you most likely don't want to buy it). * @param engine_id The engine to get the reliability of. * @pre IsValidEngine(engine_id). - * @pre GetVehicleType(engine_id) != AIVehicle::VT_TRAIN || !IsWagon(engine_id). + * @pre GetVehicleType(engine_id) != ScriptVehicle::VT_TRAIN || !IsWagon(engine_id). * @return The reliability the engine has. */ static int32 GetReliability(EngineID engine_id); @@ -104,7 +104,7 @@ public: * Get the maximum speed of an engine. * @param engine_id The engine to get the maximum speed of. * @pre IsValidEngine(engine_id). - * @pre GetVehicleType(engine_id) != AIVehicle::VT_TRAIN || !IsWagon(engine_id). + * @pre GetVehicleType(engine_id) != ScriptVehicle::VT_TRAIN || !IsWagon(engine_id). * @return The maximum speed the engine has. * @note The speed is in OpenTTD's internal speed unit. * This is mph / 1.6, which is roughly km/h. @@ -142,7 +142,7 @@ public: * Get the power of an engine. * @param engine_id The engine to get the power of. * @pre IsValidEngine(engine_id). - * @pre (GetVehicleType(engine_id) == AIVehicle::VT_RAIL || GetVehicleType(engine_id) == AIVehicle::VT_ROAD) && !IsWagon(engine_id). + * @pre (GetVehicleType(engine_id) == ScriptVehicle::VT_RAIL || GetVehicleType(engine_id) == ScriptVehicle::VT_ROAD) && !IsWagon(engine_id). * @return The power of the engine in hp. */ static int32 GetPower(EngineID engine_id); @@ -151,7 +151,7 @@ public: * Get the weight of an engine. * @param engine_id The engine to get the weight of. * @pre IsValidEngine(engine_id). - * @pre (GetVehicleType(engine_id) == AIVehicle::VT_RAIL || GetVehicleType(engine_id) == AIVehicle::VT_ROAD). + * @pre (GetVehicleType(engine_id) == ScriptVehicle::VT_RAIL || GetVehicleType(engine_id) == ScriptVehicle::VT_ROAD). * @return The weight of the engine in metric tons. */ static int32 GetWeight(EngineID engine_id); @@ -160,7 +160,7 @@ public: * Get the maximum tractive effort of an engine. * @param engine_id The engine to get the maximum tractive effort of. * @pre IsValidEngine(engine_id). - * @pre (GetVehicleType(engine_id) == AIVehicle::VT_RAIL || GetVehicleType(engine_id) == AIVehicle::VT_ROAD) && !IsWagon(engine_id). + * @pre (GetVehicleType(engine_id) == ScriptVehicle::VT_RAIL || GetVehicleType(engine_id) == ScriptVehicle::VT_ROAD) && !IsWagon(engine_id). * @return The maximum tractive effort of the engine in kN. */ static int32 GetMaxTractiveEffort(EngineID engine_id); @@ -179,13 +179,13 @@ public: * @pre IsValidEngine(engine_id). * @return The type the engine has. */ - static AIVehicle::VehicleType GetVehicleType(EngineID engine_id); + static ScriptVehicle::VehicleType GetVehicleType(EngineID engine_id); /** * Check if an engine is a wagon. * @param engine_id The engine to check. * @pre IsValidEngine(engine_id). - * @pre GetVehicleType(engine_id) == AIVehicle::VT_RAIL. + * @pre GetVehicleType(engine_id) == ScriptVehicle::VT_RAIL. * @return Whether or not the engine is a wagon. */ static bool IsWagon(EngineID engine_id); @@ -195,48 +195,48 @@ public: * @param engine_id The engine to check. * @param track_rail_type The type you want to check. * @pre IsValidEngine(engine_id). - * @pre GetVehicleType(engine_id) == AIVehicle::VT_RAIL. - * @pre AIRail::IsRailTypeAvailable(track_rail_type). + * @pre GetVehicleType(engine_id) == ScriptVehicle::VT_RAIL. + * @pre ScriptRail::IsRailTypeAvailable(track_rail_type). * @return Whether an engine of type 'engine_id' can run on 'track_rail_type'. * @note Even if a train can run on a RailType that doesn't mean that it'll be * able to power the train. Use HasPowerOnRail for that. */ - static bool CanRunOnRail(EngineID engine_id, AIRail::RailType track_rail_type); + static bool CanRunOnRail(EngineID engine_id, ScriptRail::RailType track_rail_type); /** * Check if a train engine has power on a RailType. * @param engine_id The engine to check. * @param track_rail_type Another RailType. * @pre IsValidEngine(engine_id). - * @pre GetVehicleType(engine_id) == AIVehicle::VT_RAIL. - * @pre AIRail::IsRailTypeAvailable(track_rail_type). + * @pre GetVehicleType(engine_id) == ScriptVehicle::VT_RAIL. + * @pre ScriptRail::IsRailTypeAvailable(track_rail_type). * @return Whether an engine of type 'engine_id' has power on 'track_rail_type'. */ - static bool HasPowerOnRail(EngineID engine_id, AIRail::RailType track_rail_type); + static bool HasPowerOnRail(EngineID engine_id, ScriptRail::RailType track_rail_type); /** * Get the RoadType of the engine. * @param engine_id The engine to get the RoadType of. * @pre IsValidEngine(engine_id). - * @pre GetVehicleType(engine_id) == AIVehicle::VT_ROAD. + * @pre GetVehicleType(engine_id) == ScriptVehicle::VT_ROAD. * @return The RoadType the engine has. */ - static AIRoad::RoadType GetRoadType(EngineID engine_id); + static ScriptRoad::RoadType GetRoadType(EngineID engine_id); /** * Get the RailType of the engine. * @param engine_id The engine to get the RailType of. * @pre IsValidEngine(engine_id). - * @pre GetVehicleType(engine_id) == AIVehicle::VT_RAIL. + * @pre GetVehicleType(engine_id) == ScriptVehicle::VT_RAIL. * @return The RailType the engine has. */ - static AIRail::RailType GetRailType(EngineID engine_id); + static ScriptRail::RailType GetRailType(EngineID engine_id); /** * Check if the engine is articulated. * @param engine_id The engine to check. * @pre IsValidEngine(engine_id). - * @pre GetVehicleType(engine_id) == AIVehicle::VT_ROAD || GetVehicleType(engine_id) == AIVehicle::VT_RAIL. + * @pre GetVehicleType(engine_id) == ScriptVehicle::VT_ROAD || GetVehicleType(engine_id) == ScriptVehicle::VT_RAIL. * @return True if the engine is articulated. */ static bool IsArticulated(EngineID engine_id); @@ -245,10 +245,10 @@ public: * Get the PlaneType of the engine. * @param engine_id The engine to get the PlaneType of. * @pre IsValidEngine(engine_id). - * @pre GetVehicleType(engine_id) == AIVehicle::VT_AIR. + * @pre GetVehicleType(engine_id) == ScriptVehicle::VT_AIR. * @return The PlaneType the engine has. */ - static AIAirport::PlaneType GetPlaneType(EngineID engine_id); + static ScriptAirport::PlaneType GetPlaneType(EngineID engine_id); }; #endif /* SCRIPT_ENGINE_HPP */ -- cgit v1.2.3-70-g09d2