# 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_object.hpp"
    00016 #include "ai_vehicle.hpp"
    00017 #include "ai_road.hpp"
    00018 #include "ai_rail.hpp"
    00019 #include "ai_airport.hpp"
    00020
    00024 class AIEngine : public AIObject {
    00025 public:
    00026   static const char *GetClassName() { return "AIEngine"; }
    00027
    00033   static bool IsValidEngine(EngineID engine_id);
    00034
    00041   static char *GetName(EngineID engine_id);
    00042
    00050   static CargoID GetCargoType(EngineID engine_id);
    00051
    00064   static bool CanRefitCargo(EngineID engine_id, CargoID cargo_id);
    00065
    00077   static bool CanPullCargo(EngineID engine_id, CargoID cargo_id);
    00078
    00086   static int32 GetCapacity(EngineID engine_id);
    00087
    00097   static int32 GetReliability(EngineID engine_id);
    00098
    00109   static int32 GetMaxSpeed(EngineID engine_id);
    00110
    00117   static Money GetPrice(EngineID engine_id);
    00118
    00126   static int32 GetMaxAge(EngineID engine_id);
    00127
    00135   static Money GetRunningCost(EngineID engine_id);
    00136
    00144   static int32 GetPower(EngineID engine_id);
    00145
    00153   static int32 GetWeight(EngineID engine_id);
    00154
    00162   static int32 GetMaxTractiveEffort(EngineID engine_id);
    00163
    00170   static int32 GetDesignDate(EngineID engine_id);
    00171
    00178   static AIVehicle::VehicleType GetVehicleType(EngineID engine_id);
    00179
    00187   static bool IsWagon(EngineID engine_id);
    00188
    00200   static bool CanRunOnRail(EngineID engine_id, AIRail::RailType track_rail_type);
    00201
    00211   static bool HasPowerOnRail(EngineID engine_id, AIRail::RailType track_rail_type);
    00212
    00220   static AIRoad::RoadType GetRoadType(EngineID engine_id);
    00221
    00229   static AIRail::RailType GetRailType(EngineID engine_id);
    00230
    00238   static bool IsArticulated(EngineID engine_id);
    00239
    00247   static AIAirport::PlaneType GetPlaneType(EngineID engine_id);
    00248 };
    00249
    00250 #endif /* AI_ENGINE_HPP */