I used this same method but a lot less refined in Crypt Crawl. Below are some screenshots of the custom editor.
I am going to run through the below one as I believe it shows the power of making tiles like this.
I start by checking if the tile is broken, and then if I check if it’s apart of the lower wall (is the tile below me not wall?) If it’s not a lower part of the wall then I can straight away select the tiles texture. I then do a check to see if it’s grassy, and if it’s not I can then use a texture. These two textures can be produced from 2 or 3 if statements and array accesses, which is really optimized.