Raise events when trains are removed
Posted: Thu Nov 23, 2023 6:32 am
I have a mod which displays information about trains. This information is updated whenever trains are created, split, enter or exit manual mode, and in a few other scenarios. However, it's not currently possible to tell whether a train has been completely removed due to its last rolling stock being removed without tracking when every rolling stock in the world is removed. I'd like an event called something like that is raised when a LuaTrain is destroyed without any new train being created in its place like in .
Code: Select all
on_train_destroyed
Code: Select all
on_train_created