Export tileset to Lua

Indeed, it should be possible to add this. There’s the following issue about it:

I’ve done a stab at it myself at some point, but aborted the change for some reason (unfortunately I can’t remember what I ran into). Please feel free to have a go at it. I’m available in case you have any questions, and I’m looking forward to your pull request!