Loading

Paste #peqw5lkx9

  1. /* $Id$ */
  2.  
  3. /*
  4.  * This file is part of OpenTTD.
  5.  * 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.
  6.  * 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.
  7.  * 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/>.
  8.  */
  9.  
  10. AILog.Info("1.8 API compatibility in effect.");
  11.  
  12. AIVehicle._GetUnitNumber <- AIVehicle.GetUnitNumber
  13. AIVehicle.GetUnitNumber <- function(vehicle_id)
  14. {
  15.     local unitnumber = AIVehicle._GetUnitNumber(vehicle_id);
  16.     if (unitnumber == UNITNUMBER_INVALID) return -1;
  17.     return unitnumber;
  18. }

Comments