To reproduce:
Build a train (with at least 2 carriages)
Run:
Code: Select all
/c script.on_event(defines.events.on_train_created, function(e) game.print(string.format("%d : train id: %d, old_train_id_1: %s, old_train_id_2: %s", game.tick, e.train.id, e.old_train_id_1, e.old_train_id_2))end)
I'd expect it to have an old_train_id_1, so that a mod could copy/remove the data it may have about that old train.
(Haven't tested if the old LuaTrain is already invalid, but since it doesn't get passed in the event it shouldn't matter)