When can LuaTrain.front_rail be nil?

Place to get help with not working mods / modding interface.
NiftyManiac
Long Handed Inserter
Long Handed Inserter
Posts: 90
Joined: Sat Jan 21, 2017 12:01 am
Contact:

When can LuaTrain.front_rail be nil?

Post by NiftyManiac »

In what cases will calling train.front_rail or train.back_rail return nil? Since it's impossible to place a train without rail I'm curious so things don't break unexpectedly.

As a side note, is there any direct way of getting the unminable rails underneath a wagon, short of getting all nearby rails with find_entities_filtered and attempting to destroy() them?
Post Reply

Return to “Modding help”