NoAI RoadTypes and RattRoads
Posted: 29 Mar 2021 19:18
I tried to improve support for rattroads (multiple road types), but I'm a bit lost how I could detect the roadtype on a specific tile. There is no AIRoad.GetRoadType(tile), probabaly because a tile could contain both a tram road and a normal road. There is however a function AIRoad.HasRoadType(tile, roadType), but it works different from what I would expect. Could someone check if this is working as intended, a bug in rattroads newGRF or a bug in the NoAI API?
I have built 4 roads, as below, then I check what AIRoad.HasRoadType returns for different parameters: I try every available roadtype, as well as the "default" roadTypes and check 4 tiles with each a different roadtype on it. Seemingly all roadtiles have all road-roadtypes on it according to the API.
I have built 4 roads, as below, then I check what AIRoad.HasRoadType returns for different parameters: I try every available roadtype, as well as the "default" roadTypes and check 4 tiles with each a different roadtype on it. Seemingly all roadtiles have all road-roadtypes on it according to the API.