mirror of https://github.com/OpenTTD/OpenTTD
(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)
parent
83831b5b9d
commit
63857f8487
|
@ -262,7 +262,7 @@ class AIWaypointList extends _AIWaypointList {
|
||||||
AIRoad._BuildRoadStation <- AIRoad.BuildRoadStation;
|
AIRoad._BuildRoadStation <- AIRoad.BuildRoadStation;
|
||||||
AIRoad.BuildRoadStation <- function(tile, front, road_veh_type, station_id)
|
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);
|
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 <- AIRoad.BuildDriveThroughRoadStation;
|
||||||
AIRoad.BuildDriveThroughRoadStation <- function(tile, front, road_veh_type, station_id)
|
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);
|
return AIRoad._BuildDriveThroughRoadStation(tile, front, road_veh_type, station_id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ AILog.Info("1.0 API compatability in effect.");
|
||||||
AIRoad._BuildRoadStation <- AIRoad.BuildRoadStation;
|
AIRoad._BuildRoadStation <- AIRoad.BuildRoadStation;
|
||||||
AIRoad.BuildRoadStation <- function(tile, front, road_veh_type, station_id)
|
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);
|
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 <- AIRoad.BuildDriveThroughRoadStation;
|
||||||
AIRoad.BuildDriveThroughRoadStation <- function(tile, front, road_veh_type, station_id)
|
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);
|
return AIRoad._BuildDriveThroughRoadStation(tile, front, road_veh_type, station_id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue