# ai_engine.hpp

Go to the documentation of this file.

    00001 /* $Id$ */
    00002
    00003 /*
    00004  * This file is part of OpenTTD.
    00005  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
    00006  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    00007  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
    00008  */
    00009
    00012 #ifndef AI_ENGINE_HPP
    00013 #define AI_ENGINE_HPP
    00014
    00015 #include "ai_vehicle.hpp"
    00016 #include "ai_rail.hpp"
    00017 #include "ai_airport.hpp"
    00018
    00022 class AIEngine : public AIObject {
    00023 public:
    00025   static const char *GetClassName() { return "AIEngine"; }
    00026
    00033   static bool IsValidEngine(EngineID engine_id);
    00034
    00040   static bool IsBuildable(EngineID engine_id);
    00041
    00048   static char *GetName(EngineID engine_id);
    00049
    00057   static CargoID GetCargoType(EngineID engine_id);
    00058
    00071   static bool CanRefitCargo(EngineID engine_id, CargoID cargo_id);
    00072
    00084   static bool CanPullCargo(EngineID engine_id, CargoID cargo_id);
    00085
    00093   static int32 GetCapacity(EngineID engine_id);
    00094
    00104   static int32 GetReliability(EngineID engine_id);
    00105
    00116   static int32 GetMaxSpeed(EngineID engine_id);
    00117
    00124   static Money GetPrice(EngineID engine_id);
    00125
    00133   static int32 GetMaxAge(EngineID engine_id);
    00134
    00142   static Money GetRunningCost(EngineID engine_id);
    00143
    00151   static int32 GetPower(EngineID engine_id);
    00152
    00160   static int32 GetWeight(EngineID engine_id);
    00161
    00169   static int32 GetMaxTractiveEffort(EngineID engine_id);
    00170
    00177   static int32 GetDesignDate(EngineID engine_id);
    00178
    00185   static AIVehicle::VehicleType GetVehicleType(EngineID engine_id);
    00186
    00194   static bool IsWagon(EngineID engine_id);
    00195
    00207   static bool CanRunOnRail(EngineID engine_id, AIRail::RailType track_rail_type);
    00208
    00218   static bool HasPowerOnRail(EngineID engine_id, AIRail::RailType track_rail_type);
    00219
    00227   static AIRoad::RoadType GetRoadType(EngineID engine_id);
    00228
    00236   static AIRail::RailType GetRailType(EngineID engine_id);
    00237
    00245   static bool IsArticulated(EngineID engine_id);
    00246
    00254   static AIAirport::PlaneType GetPlaneType(EngineID engine_id);
    00255 };
    00256
    00257 #endif /* AI_ENGINE_HPP */