Hey together,
any tipps how to check the rail bridge length during building a rail bridge? I want to limit the maximum bridge length to a certain amount of straight rails (e.g. max 20 straight rails). On building the 21st rail, the rail placement should be inhibited.
How to check the built object right next to the current building position?
Thanks in advance for your tipps!
How to check rail bridge length in Lua?
Re: How to check rail bridge length in Lua?
In your case, entity.get_connected_rail should do the trick.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: How to check rail bridge length in Lua?
I will try that. Thank you so far!