Should AITile.HasTransportType(tile, AITile.TRANSPORT_ROAD) return true for tram track tiles? It seems like it should to me, but it doesn't. At least it doesn't in this particular case...
The code that produced this was (with minor changes to make it more readable)...
Code: Select all
local adjRoads = LandManager.GetAdjacentTileList(tile); // Get the four neighbouring tiles
adjRoads.Valuate(function (_tile) {
local hasRoad = AITile.HasTransportType(_tile, AITile.TRANSPORT_ROAD);
AISign.BuildSign(_tile, ":" + ((hasRoad) ? "Y" : "N"));
return (hasRoad) ? 1 : 0;
});
adjRoads.KeepValue(1);
AISign.BuildSign(tile, ":"+adjRoads.Count()+((straightRoad)?"S":"="));
Thanks very much

Edit: The result is the same regardless of the current road type by the way.