Keeping track of trains is hard work. An event that is triggered when a trains consist changes would be a big help.
events.on_train_consist_changed -- Fires whenever a trains consist is changed
event.trains -- Array of new trains (for adding it would have just the "new" train, for removing it would contain both new trains)
event.player_index -- The player who changed the trains
Would fire for manual coupling/decoupling as well as after building a locomotive/cargo-wagon
Even if it just fired for manual coupling/decoupling would be a great benifit.
Thanks!
Event for trains manual coupling /consist changes
-
- Fast Inserter
- Posts: 124
- Joined: Wed Mar 30, 2016 7:54 pm
- Contact:
Re: Event for trains manual coupling /consist changes
+1
Tutorials, wild playthroughs, and more! https://www.youtube.com/@KatherineOfSky
Re: Event for trains manual coupling /consist changes
I already added an event when a train is created for 0.15 which will fire when any of these things happen due to how trains work.
It doesn't contain the player that did it but that information isn't known by the trains or train system anyway so it's not available for any events.
It doesn't contain the player that did it but that information isn't known by the trains or train system anyway so it's not available for any events.
If you want to get ahold of me I'm almost always on Discord.
Re: Event for trains manual coupling /consist changes
Is there anything you haven't done yet! Thanks and Looking forward to .15
Re: Event for trains manual coupling /consist changes
Patch notes for 0.15 will be huge. I hope I won't overlook events that would make life much easier. 

My Mods: mods.factorio.com