LuaTrain.go_to_station - separate from schedule

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 582
Joined: Tue May 19, 2015 1:56 am
Contact:

LuaTrain.go_to_station - separate from schedule

Post by Reika »

Basically the ability to, on a LuaTrain object, pass in a specific station (likely given by name, or maybe train stop entity), which will direct the train there, without touching the train's current schedule; it would merely go to the station and then eventually (timer?) return to its normal schedule.

So if train X is set with stations A, B, C, and D, and the train has recently arrived at B, I can tell it via script to go to station F without adding F to its list, and when leaving F, the train will go onto station C.
Image

Bilka
Factorio Staff
Factorio Staff
Posts: 3155
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: LuaTrain.go_to_station - separate from schedule

Post by Bilka »

Would it be okay for you if it did touch the schedule until the train arrives at the destination? What you describe could be achieved by a temporary station. Not touching the schedule at all looks pretty much impossible to me.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 582
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: LuaTrain.go_to_station - separate from schedule

Post by Reika »

Bilka wrote:
Fri Jun 07, 2019 2:53 pm
Would it be okay for you if it did touch the schedule until the train arrives at the destination? What you describe could be achieved by a temporary station. Not touching the schedule at all looks pretty much impossible to me.
Sure, a temporary change to the schedule is fine, so long as once it arrives at the temporary station, the schedule is as if nothing ever happened.
Image

Post Reply

Return to “Modding interface requests”