Code: Select all
/c script.on_event(defines.events.on_entity_renamed, function(e) game.print(e.position.x) end)
I don't see how to identify which train station was renamed if I don't have a position for it, there can be many with the old name, if I'm blindspotting on something there I'd be happy with whatever workaround I've missed.