summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_vehicle.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-01-02 15:52:29 +0000
committeryexo <yexo@openttd.org>2010-01-02 15:52:29 +0000
commitfe67e85700988303c6e0148fa6212bf3904c8fca (patch)
tree84c8f9073611d231b11fa755b46c051ccc587ade /src/ai/api/ai_vehicle.cpp
parentea75e7da60300bd0b1913a1a19ea554da21a592c (diff)
downloadopenttd-fe67e85700988303c6e0148fa6212bf3904c8fca.tar.xz
(svn r18687) -Add [NoAI]: AIEngine::IsBuildable to check if you can build a certain engine.
-Change: AIEngine::IsValidEngine will now also return true when you have at least one vehicle of that type even if you can't build it anymore.
Diffstat (limited to 'src/ai/api/ai_vehicle.cpp')
-rw-r--r--src/ai/api/ai_vehicle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/api/ai_vehicle.cpp b/src/ai/api/ai_vehicle.cpp
index c05f67909..03f39bae6 100644
--- a/src/ai/api/ai_vehicle.cpp
+++ b/src/ai/api/ai_vehicle.cpp
@@ -64,7 +64,7 @@
/* static */ VehicleID AIVehicle::BuildVehicle(TileIndex depot, EngineID engine_id)
{
- EnforcePrecondition(INVALID_VEHICLE, AIEngine::IsValidEngine(engine_id));
+ EnforcePrecondition(INVALID_VEHICLE, AIEngine::IsBuildable(engine_id));
::VehicleType type = ::Engine::Get(engine_id)->type;