The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

traffic lights and signals

Started by Andarix, March 28, 2024, 09:43:51 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Traffic lights should be automatically removed when an intersection is no longer an intersection due to road demolition. The traffic lights are then in a field that is actually forbidden.
Even removing the traffic light may not always be possible because it can belong to another player.

The same applies to signals on rails. If there are invalid tracks due to renovations, signals should be removed.

If a signal field becomes an end tile, the signal is no longer displayed visually. If the signal field becomes an intersection, then the signal is on a field that is actually forbidden.

Screenshot 2024-03-28 103439.png

Alternatively, construction activities that lead to invalid conditions would have to be prevented.


That traffic light works like a pedestrian crossing and was left intentionally. But it is easy to remove it once there are only two ribis left.

Isaac Eiland-Hall

Just a quick request for consideration: I have found it useful to have a traffic light on a road without an intersection to direct trucks/busses to help with spacing - a medium-long red with a short enough green so that only one vehicle gets through...

But if this is not enough to justify leaving the functionality, no worries. It's probably not worth it to ask for someone to write code to support an alternate light that could be specifically placed on road for that purpose (I.e. placed not on an intersection). I can't imagine it's a common usage, although I've seen the strategy discussed a couple of times over the years. :)

(I think changing it to be removed once there are fewer than 2 ribis would probably keep that functionality)


The background to this concern is Script AI. They are now also building traffic lights. They still need some optimization.

It's just that the traffic light belongs to a different player than the player who removes the intersection. This should mean that such double traffic lights could be present on the maps quite often. Especially with sets/maps that favor road traffic.

Another option would be to make it generally public so that it can be removed. However, the question then becomes whether the phases can be changed by everyone or not. In network games, this is likely to lead to mutual hindrance if everyone is allowed to change the phases.


If the owner checks, human traffic lights can be excluded from being removed.


Since the traffic lights are switching in a sync_step, it is trivial to remove them if the underlying way has less than a straight ribi. Added in r11104