diff options
author | terkhen <terkhen@openttd.org> | 2010-02-24 21:55:03 +0000 |
---|---|---|
committer | terkhen <terkhen@openttd.org> | 2010-02-24 21:55:03 +0000 |
commit | a4a66ec1aa2a7772ed174b8dcc1905e9bc5dd02d (patch) | |
tree | f51b3f2e3540e485a807591436e56978483539db /bin/ai | |
parent | aba24e44cf76479a33e78cc0a8d6d5279aeef00b (diff) | |
download | openttd-a4a66ec1aa2a7772ed174b8dcc1905e9bc5dd02d.tar.xz |
(svn r19231) -Feature: Allow overbuilding of road stops.
Diffstat (limited to 'bin/ai')
-rw-r--r-- | bin/ai/compat_0.7.nut | 16 | ||||
-rw-r--r-- | bin/ai/compat_1.0.nut | 19 | ||||
-rw-r--r-- | bin/ai/regression/regression.txt | 16 |
3 files changed, 41 insertions, 10 deletions
diff --git a/bin/ai/compat_0.7.nut b/bin/ai/compat_0.7.nut index 3e4b4fa68..db56fdaee 100644 --- a/bin/ai/compat_0.7.nut +++ b/bin/ai/compat_0.7.nut @@ -258,3 +258,19 @@ class AIWaypointList extends _AIWaypointList { ::_AIWaypointList.constructor(AIWaypoint.WAYPOINT_RAIL); } } + +AIRoad._BuildRoadStation <- AIRoad.BuildRoadStation; +AIRoad.BuildRoadStation <- function(tile, front, road_veh_type, station_id) +{ + if (AIRoad.IsRoadStationTile(tile)) return false; + + return AIRoad._BuildRoadStation(tile, front, road_veh_type, station_id); +} + +AIRoad._BuildDriveThroughRoadStation <- AIRoad.BuildDriveThroughRoadStation; +AIRoad.BuildDriveThroughRoadStation <- function(tile, front, road_veh_type, station_id) +{ + if (AIRoad.IsRoadStationTile(tile)) return false; + + return AIRoad._BuildDriveThroughRoadStation(tile, front, road_veh_type, station_id); +} diff --git a/bin/ai/compat_1.0.nut b/bin/ai/compat_1.0.nut index f14520c1e..77ae2525a 100644 --- a/bin/ai/compat_1.0.nut +++ b/bin/ai/compat_1.0.nut @@ -7,5 +7,20 @@ * 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/>. */ -/* Enable when adding the first compatability code: - * AILog.Info("1.0 API compatability in effect"); */ +AILog.Info("1.0 API compatability in effect."); + +AIRoad._BuildRoadStation <- AIRoad.BuildRoadStation; +AIRoad.BuildRoadStation <- function(tile, front, road_veh_type, station_id) +{ + if (AIRoad.IsRoadStationTile(tile)) return false; + + return AIRoad._BuildRoadStation(tile, front, road_veh_type, station_id); +} + +AIRoad._BuildDriveThroughRoadStation <- AIRoad.BuildDriveThroughRoadStation; +AIRoad.BuildDriveThroughRoadStation <- function(tile, front, road_veh_type, station_id) +{ + if (AIRoad.IsRoadStationTile(tile)) return false; + + return AIRoad._BuildDriveThroughRoadStation(tile, front, road_veh_type, station_id); +} diff --git a/bin/ai/regression/regression.txt b/bin/ai/regression/regression.txt index be69ce388..aa45f1151 100644 --- a/bin/ai/regression/regression.txt +++ b/bin/ai/regression/regression.txt @@ -7259,7 +7259,7 @@ BuildRoadStation(): false BuildRoadStation(): false BuildRoadStation(): true - BuildRoadStation(): false + BuildRoadStation(): true IsStationTile(): true IsStationTile(): false HasRoadType(Road): true @@ -8452,11 +8452,11 @@ 14 => 1 12 => 1 Age ListDump: + 14 => 1 + 13 => 1 + 12 => 1 17 => 0 16 => 0 - 14 => 0 - 13 => 0 - 12 => 0 MaxAge ListDump: 16 => 10980 14 => 10980 @@ -8465,10 +8465,10 @@ 12 => 5490 AgeLeft ListDump: 16 => 10980 - 14 => 10980 + 14 => 10979 17 => 7320 - 13 => 5490 - 12 => 5490 + 13 => 5489 + 12 => 5489 CurrentSpeed ListDump: 12 => 21 17 => 0 @@ -8486,7 +8486,7 @@ 16 => 0 14 => 0 13 => 0 - 12 => 0 + 12 => -1 ProfitLastYear ListDump: 17 => 0 16 => 0 |