(svn r20913) -Fix (r19231): [NoAI] give the correct error message if you try to overbuild an opponont road station with your own while using the 0.7 or 1.0 compatibility layer (fanioz)

This commit is contained in:
yexo 2010-10-10 15:33:22 +00:00
parent 83831b5b9d
commit 63857f8487
2 changed files with 4 additions and 4 deletions

View File

@ -262,7 +262,7 @@ class AIWaypointList extends _AIWaypointList {
AIRoad._BuildRoadStation <- AIRoad.BuildRoadStation;
AIRoad.BuildRoadStation <- function(tile, front, road_veh_type, station_id)
{
if (AIRoad.IsRoadStationTile(tile)) return false;
if (AIRoad.IsRoadStationTile(tile) && AICompany.IsMine(AITile.GetOwner(tile))) return false;
return AIRoad._BuildRoadStation(tile, front, road_veh_type, station_id);
}
@ -270,7 +270,7 @@ AIRoad.BuildRoadStation <- function(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;
if (AIRoad.IsRoadStationTile(tile) && AICompany.IsMine(AITile.GetOwner(tile))) return false;
return AIRoad._BuildDriveThroughRoadStation(tile, front, road_veh_type, station_id);
}

View File

@ -12,7 +12,7 @@ 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;
if (AIRoad.IsRoadStationTile(tile) && AICompany.IsMine(AITile.GetOwner(tile))) return false;
return AIRoad._BuildRoadStation(tile, front, road_veh_type, station_id);
}
@ -20,7 +20,7 @@ AIRoad.BuildRoadStation <- function(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;
if (AIRoad.IsRoadStationTile(tile) && AICompany.IsMine(AITile.GetOwner(tile))) return false;
return AIRoad._BuildDriveThroughRoadStation(tile, front, road_veh_type, station_id);
}