(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.
This commit is contained in:
yexo
2010-01-02 15:52:29 +00:00
parent 2f29975421
commit 8f50437298
9 changed files with 186 additions and 5 deletions

View File

@@ -300,7 +300,7 @@ public:
* @param engine_id The engine to use for this vehicle.
* @pre The tile at depot has a depot that can build the engine and
* is owned by you.
* @pre IsValidEngine(engine_id).
* @pre AIEngine::IsBuildable(engine_id).
* @exception AIVehicle::ERR_VEHICLE_TOO_MANY
* @exception AIVehicle::ERR_VEHICLE_BUILD_DISABLED
* @exception AIVehicle::ERR_VEHICLE_WRONG_DEPOT