LuaTrain back/front carriage
Posted: Sat Jun 25, 2016 5:34 am
Carriages, locomotives, and cargo_wagons are all existing array variables for each LuaTrain. LuaTrain also contains front_rail, back_rail, rail_direction_from_front_rail and rail_direction_from_back_rail. It would be nice if we had a function or variable that stored a reference to the current front and back carriage and locomotives as opposed to having to obtain them through other means such as iterating through carriages and searching the location near the front and back rail (if non-nil).