[2.0.77] Allow LuaEntities representing train stops as elements in AddRecordData

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
hgschmie
Fast Inserter
Fast Inserter
Posts: 196
Joined: Tue Feb 06, 2024 5:18 am
Contact:

[2.0.77] Allow LuaEntities representing train stops as elements in AddRecordData

Post by hgschmie »

There are two ways of adding new records to a train schedule: a specific rail (LuaEntity), maybe refined with rail_direction or a train stop name. The former allows to exactly pinpoint where a train should go, the latter tells the train "find any station with that name and go there".

It should be possible, in addition to those to do station = <lua entity that represents a train stop>. This would combine those two things: Pinpoint a specific station and send the train there. Basically a combination of having a temp stop with the rail attached to the station and the station name (which is what e.g. LTN uses to schedule trains). Given that pinpointing a rail is already possible, why not allow pinpointing a station as well?

(bonus points for allowing stations on different surfaces. ;-) )
Post Reply

Return to “Modding interface requests”