Search found 2 matches
- Wed Jan 16, 2019 3:43 pm
- Forum: Implemented mod requests
- Topic: Reading "Trains in block" from a rail entity
- Replies: 2
- Views: 1151
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 ...
- Sat Dec 29, 2018 1:11 am
- Forum: Implemented mod requests
- Topic: Reading "Trains in block" from a rail entity
- Replies: 2
- Views: 1151
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:can_place ...