# ai_engine.hpp

Go to the documentation of this file.

    00001 /* $Id: ai_engine.hpp 18687 2010-01-02 15:52:29Z yexo $ */
    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
    00034   static bool IsValidEngine(EngineID engine_id);
    00035
    00041   static bool IsBuildable(EngineID engine_id);
    00042
    00049   static char *GetName(EngineID engine_id);
    00050
    00058   static CargoID GetCargoType(EngineID engine_id);
    00059
    00072   static bool CanRefitCargo(EngineID engine_id, CargoID cargo_id);
    00073
    00085   static bool CanPullCargo(EngineID engine_id, CargoID cargo_id);
    00086
    00094   static int32 GetCapacity(EngineID engine_id);
    00095
    00105   static int32 GetReliability(EngineID engine_id);
    00106
    00117   static int32 GetMaxSpeed(EngineID engine_id);
    00118
    00125   static Money GetPrice(EngineID engine_id);
    00126
    00134   static int32 GetMaxAge(EngineID engine_id);
    00135
    00143   static Money GetRunningCost(EngineID engine_id);
    00144
    00152   static int32 GetPower(EngineID engine_id);
    00153
    00161   static int32 GetWeight(EngineID engine_id);
    00162
    00170   static int32 GetMaxTractiveEffort(EngineID engine_id);
    00171
    00178   static int32 GetDesignDate(EngineID engine_id);
    00179
    00186   static AIVehicle::VehicleType GetVehicleType(EngineID engine_id);
    00187
    00195   static bool IsWagon(EngineID engine_id);
    00196
    00208   static bool CanRunOnRail(EngineID engine_id, AIRail::RailType track_rail_type);
    00209
    00219   static bool HasPowerOnRail(EngineID engine_id, AIRail::RailType track_rail_type);
    00220
    00228   static AIRoad::RoadType GetRoadType(EngineID engine_id);
    00229
    00237   static AIRail::RailType GetRailType(EngineID engine_id);
    00238
    00246   static bool IsArticulated(EngineID engine_id);
    00247
    00255   static AIAirport::PlaneType GetPlaneType(EngineID engine_id);
    00256 };
    00257
    00258 #endif /* AI_ENGINE_HPP */