wallyweb wrote:By the way, if one counts the slope above sea level, a bridge over docks is actually a minimum two levels high.

Yes, it is one level high on the "slope" part and two levels high on the "water" part. On the other hand, for dock buoys, it is just one level high. (I do not quite like having a bridge right over a buoy, as the buoy is then completely hidden, but the possibility is there if you want it.)
By the way, I have just realised that I forgot to allow bridges over normal buoys. Expect it to happen in next version, or when I finally merge this.
HackaLittleBit wrote:I have a solution for you if you don't mind.
Use the function 'CanStationTileHavePylons'.(maybe rename it in IsRooflessStationTile)
Thanks for the suggestion—I will take a look at it.
wallyweb wrote:By the way, I was about to suggest to Cirdan to allow bridges of between height levels two and three until I saw your screenshot of the arched roof and I realized that bridge pillars would be a problem graphically. Your suggestion to restrict the bridge to only over low platforms would be ideal. Hopefully you and Cirdan can make it work.

Good point. I had thought of allowing bridges over rail stations if they were high enough, but the pillars would certainly be an issue.
Quast65 wrote:So, if I understand correctly, the possibility of bridges being built over custom station tiles depends on the Z-extent of the boundingbox of the station?
If so, what is the max hight of that Z-extent?
Well, currently you cannot build bridges over any rail station tile—the code just does not handle this. I did have in mind to allow it in the future depending on the height of the sprites, but wallyweb has raised a very good point here: even if the bridge surface stays clear above the building, there may be glitches with the pillars. So we need something better. HackaLittleBit's suggestion of using CanStationTileHavePylons looks good for a start, but may be overly restrictive: As the NewGRF author, you may decide to explicitly allow bridges over some of your station tiles, perhaps because they are a solid building and it makes sense to have the pillars rest on its roof.
wallyweb wrote:Did I miss anything?
No, as far as I can tell. Your post pretty much summarises the current situation.
I see several steps that can be taken forward: First, we can allow bridges over the standard non-roof rail station tiles, and disallow them over anything else. Second, we can allow bridges over any rail station tile that can have pylons, as per HackaLittleBit's suggestion, and see how it goes. Last, we can introduce a new property for NewGRFs authors to decide whether to allow bridges or not.
There are two very good things about all this: we are only dealing with graphical issues and the savegame format is not changed. This means that, whatever we do, we can always roll back to a previous state and nobody will lose their games.