diff options
author | truebrain <truebrain@openttd.org> | 2009-01-16 00:05:26 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2009-01-16 00:05:26 +0000 |
commit | 94dd36d1eceb487616f9f0ea260fbe00d84cc267 (patch) | |
tree | 9e3c6b823cc8e282db94a22336d126affeaaac1c /bin/ai/library/pathfinder | |
parent | 5119132dda807aacb65e2afcce22665e7eedc577 (diff) | |
download | openttd-94dd36d1eceb487616f9f0ea260fbe00d84cc267.tar.xz |
(svn r15101) -Change [API CHANGE]: more consistant naming for consts:
INVALID_TOWN_RATING -> TOWN_RATING_INVALID
INVALID_TRANSPORT -> TRANSPORT_INVALID
INVALID_ORDER -> ORDER_INVALID
INVALID_GROUP -> GROUP_INVALID
GROUP_ALL/DEFAULT -> ALL/DEFAULT_GROUP
VEHICLE_RAIL/ROAD/.. -> VT_RAIL/ROAD/..
MY_COMPANY -> COMPANY_SELF
FIRST/LAST/INVALID_COMPANY -> COMPANY_FIRST/LAST/INVALID
Diffstat (limited to 'bin/ai/library/pathfinder')
-rw-r--r-- | bin/ai/library/pathfinder/rail/main.nut | 4 | ||||
-rw-r--r-- | bin/ai/library/pathfinder/road/main.nut | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/bin/ai/library/pathfinder/rail/main.nut b/bin/ai/library/pathfinder/rail/main.nut index ad5a6664e..2a9186799 100644 --- a/bin/ai/library/pathfinder/rail/main.nut +++ b/bin/ai/library/pathfinder/rail/main.nut @@ -341,7 +341,7 @@ function Rail::_GetTunnelsBridges(last_node, cur_node, bridge_dir) for (local i = 2; i < this._max_bridge_length; i++) { local bridge_list = AIBridgeList_Length(i + 1); local target = cur_node + i * (cur_node - last_node); - if (!bridge_list.IsEmpty() && AIBridge.BuildBridge(AIVehicle.VEHICLE_RAIL, bridge_list.Begin(), cur_node, target)) { + if (!bridge_list.IsEmpty() && AIBridge.BuildBridge(AIVehicle.VT_RAIL, bridge_list.Begin(), cur_node, target)) { tiles.push([target, bridge_dir]); } } @@ -353,7 +353,7 @@ function Rail::_GetTunnelsBridges(last_node, cur_node, bridge_dir) local tunnel_length = AIMap.DistanceManhattan(cur_node, other_tunnel_end); local prev_tile = cur_node + (cur_node - other_tunnel_end) / tunnel_length; if (AITunnel.GetOtherTunnelEnd(other_tunnel_end) == cur_node && tunnel_length >= 2 && - prev_tile == last_node && tunnel_length < _max_tunnel_length && AITunnel.BuildTunnel(AIVehicle.VEHICLE_RAIL, cur_node)) { + prev_tile == last_node && tunnel_length < _max_tunnel_length && AITunnel.BuildTunnel(AIVehicle.VT_RAIL, cur_node)) { tiles.push([other_tunnel_end, bridge_dir]); } return tiles; diff --git a/bin/ai/library/pathfinder/road/main.nut b/bin/ai/library/pathfinder/road/main.nut index b33722369..9c5564656 100644 --- a/bin/ai/library/pathfinder/road/main.nut +++ b/bin/ai/library/pathfinder/road/main.nut @@ -300,7 +300,7 @@ function Road::_GetTunnelsBridges(last_node, cur_node, bridge_dir) for (local i = 2; i < this._max_bridge_length; i++) { local bridge_list = AIBridgeList_Length(i + 1); local target = cur_node + i * (cur_node - last_node); - if (!bridge_list.IsEmpty() && AIBridge.BuildBridge(AIVehicle.VEHICLE_ROAD, bridge_list.Begin(), cur_node, target)) { + if (!bridge_list.IsEmpty() && AIBridge.BuildBridge(AIVehicle.VT_ROAD, bridge_list.Begin(), cur_node, target)) { tiles.push([target, bridge_dir]); } } @@ -312,7 +312,7 @@ function Road::_GetTunnelsBridges(last_node, cur_node, bridge_dir) local tunnel_length = AIMap.DistanceManhattan(cur_node, other_tunnel_end); local prev_tile = cur_node + (cur_node - other_tunnel_end) / tunnel_length; if (AITunnel.GetOtherTunnelEnd(other_tunnel_end) == cur_node && tunnel_length >= 2 && - prev_tile == last_node && tunnel_length < _max_tunnel_length && AITunnel.BuildTunnel(AIVehicle.VEHICLE_ROAD, cur_node)) { + prev_tile == last_node && tunnel_length < _max_tunnel_length && AITunnel.BuildTunnel(AIVehicle.VT_ROAD, cur_node)) { tiles.push([other_tunnel_end, bridge_dir]); } return tiles; |