Query train block state from rail entity (fetch signals)

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Aidiakapi
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Fri Apr 14, 2017 6:13 pm
Contact:

Query train block state from rail entity (fetch signals)

Post by Aidiakapi »

If I have a rail entity, I'd like to be able to query the state of the block.

I'm interested in these properties:
  • Amount of trains currently in block (as displayed on the GUI).
  • Amount of trains about to enter a block (the ones that have put signals on orange).
My usage is to be able to spawn a train at a section, without having other trains crash into it.

Post Reply

Return to “Modding interface requests”