Codechange: Pass GRFConfig by reference where feasible. (#13388)
[openttd-github.git] / bin / ai / compat_1.11.nut
blob1b6bc4da04fc8dcfe01a261c23c593eda8ce09dc
1 /*
2 * This file is part of OpenTTD.
3 * 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.
4 * 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.
5 * 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/>.
6 */
8 AILog.Info("1.11 API compatibility in effect.");
10 /* 13 really checks RoadType against RoadType */
11 AIRoad._HasRoadType <- AIRoad.HasRoadType;
12 AIRoad.HasRoadType <- function(tile, road_type)
14 local list = AIRoadTypeList(AIRoad.GetRoadTramType(road_type));
15 foreach (rt, _ in list) {
16 if (AIRoad._HasRoadType(tile, rt)) {
17 return true;
20 return false;
23 /* 15 renames GetBridgeID */
24 AIBridge.GetBridgeID <- AIBridge.GetBridgeType;