function BuildStations()
{
local done = false;
local pos = 1;
while ( AIRoad.BuildRoadStation(
path[pos], path[pos] + 1,
AIRoad.ROADVEHTYPE_BUS,
AIStation.STATION_JOIN_ADJACENT
) )
{
pos++;
done = true;
}
if ( !done )
return false;
done = false;
pos = path.len() - 2;
while ( AIRoad.BuildRoadStation(
path[pos], path[pos] - 1,
AIRoad.Roadai.ROADVEHTYPE_BUS,
AIStation.STATION_JOIN_ADJACENT
) )
{
pos--;
done = true;
}
return done;
}