Search found 2 matches

by Pendarin
Wed Jan 16, 2019 3:43 pm
Forum: Implemented mod requests
Topic: Reading "Trains in block" from a rail entity
Replies: 2
Views: 967

Re: Reading "Trains in block" from a rail entity

That would be excellent. As you can imagine, calculating this in Lua is expensive and complicated since Lua isn't exposed at all to the rail block constructs the engine uses. So, in Lua I'd have to model the entire thing by scanning rails, finding nearby signals, checking for branches and loops, etc...
by Pendarin
Sat Dec 29, 2018 1:11 am
Forum: Implemented mod requests
Topic: Reading "Trains in block" from a rail entity
Replies: 2
Views: 967

Reading "Trains in block" from a rail entity

The vanilla GUI shows "Trains in block" when you hover over a rail entity. I am in need of exactly that programmatically. I can't seem to find any way to do this. My goal is to determine whether it is safe to place a carriage on a given rail. Not just whether I can (the normal LuaSurface:c...

Go to advanced search