(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:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user